Query Processes and Templates
GET /document
This service allows you to query your signature processes, automated templates, or your own automated templates in Auco.
Authentication
Include your public key in the Authorization header.
Authorization: puk_xxx...
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
code | String | Optional | Document code associated with the process. Required if package is not included. |
image | String | Optional | If "true", includes the signers' identification and photo images in the response. |
⚠️ If you do not send the
codeattribute, you will receive a list of automated templates.
This same endpoint can also be used to retrieve a document package, see more at the link.
🧪 Usage Examples
You can copy any of the examples according to your preferred programming language.
🔹 Get General Process Information
- curl
- Python
- Node.js
curl --location 'https://api.auco.ai/v1.5/ext/document?code=CODEDOCUM' \
--header 'Authorization: puk_yourPublicKey'
import requests
response = requests.get(
"https://api.auco.ai/v1.5/ext/document",
headers={"Authorization": "puk_yourPublicKey"},
params={"package": "CODEDOCUM"}
)
print(response.json())
const axios = require('axios');
axios
.get('https://api.auco.ai/v1.5/ext/document', {
headers: { Authorization: 'puk_yourPublicKey' },
params: { package: 'CODEDOCUM' },
})
.then((response) => console.log(response.data));
🔹 Get Process with Signer Images
By including the image=true parameter, the response will include the signers' identification and photo images when available.
- curl
- Python
- Node.js
curl --location 'https://api.auco.ai/v1.5/ext/document?code=CODEDOCUM&image=true' \
--header 'Authorization: puk_yourPublicKey'
import requests
response = requests.get(
"https://api.auco.ai/v1.5/ext/document",
headers={"Authorization": "puk_yourPublicKey"},
params={"code": "CODEDOCUM", "image": "true"}
)
print(response.json())
const axios = require('axios');
axios
.get('https://api.auco.ai/v1.5/ext/document', {
headers: { Authorization: 'puk_yourPublicKey' },
params: { code: 'CODEDOCUM', image: 'true' },
})
.then((response) => console.log(response.data));
📥 Example Response
{
"url": "https://signed_url",
"name": "prueba firma garabato",
"code": "CODEDOCUM",
"status": "CREATED",
"data": {
"code": "CODEDOCUM",
"name": "prueba firma garabato",
"camera": false,
"otpCode": false,
"signFinish": false,
"signProfile": [
{
"name": "Firmante de prueba",
"email": "example@auco.ai",
"id": "G8",
"status": "NOTIFICATION"
}
],
"createdAt": "2025-01-02T16:54:00.297Z",
"updatedAt": "2025-01-02T16:54:03.105Z"
},
"signProfile": [
{
"name": "Mauricio Lopez",
"email": "maurilo934@hotmail.com",
"id": "G8",
"status": "NOTIFICATION"
}
]
}
🔄 Document Status (status)
| Status | Description |
|---|---|
CREATED | When the process has been created. |
REJECTED | Process rejected. |
EXPIRED | Process expired, only if an expiration date was set. |
FINISH | Process signed or approved by all parties. |
🔄 Participant Status (status)
| Status | Description |
|---|---|
NOTIFICATION | The participant has been notified for signing. |
REJECT | The participant has rejected the signing or approval. |
FINISH | The participant has signed or approved the process. |
BLOCK | The participant exceeded failed attempts while signing or approving. |
PENDING | The participant has not been notified, usually due to a sequential process. |
🖼️ Signer Images
When the image=true parameter is sent, each object in signProfile may include the following image fields:
| Field | Description |
|---|---|
identificationCard | Front photo of the identification card |
identificationCardBack | Back photo of the identification card |
photo | Selfie/photo of the signer |
Image Format
Each image field has the following structure:
{
"type": "base64 | presigned",
"data": "..."
}
| Type | data Content | Description |
|---|---|---|
base64 | data:image/jpeg;base64,... | The image is base64 encoded |
presigned | S3 URL (e.g., https://s3...) | Signed URL valid for 5 minutes |
Example Response with Images
{
"url": "https://signed_url",
"name": "Service Agreement",
"code": "CODEDOCUM",
"status": "FINISH",
"signProfile": [
{
"name": "John Smith",
"email": "john@example.com",
"id": "G8",
"status": "FINISH",
"identificationCard": {
"type": "presigned",
"data": "https://s3.amazonaws.com/bucket/..."
},
"identificationCardBack": {
"type": "presigned",
"data": "https://s3.amazonaws.com/bucket/..."
},
"photo": {
"type": "base64",
"data": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
}
}
]
}
Presigned URLs are valid for 5 minutes. Make sure to download the images before they expire.
⚠️ Error Responses
| Code | Description |
|---|---|
| 400 | Process not found (DOCUMENT_NOT_FOUND) |
| 401 | Invalid or missing authentication |