Retrieve Process and Attachments
GET /attachments
This service allows you to retrieve the attachments uploaded by signers within a process. The response structure varies depending on whether the userId
parameter is included.
Authentication
Include your public key in the Authorization
header.
Authorization: puk_xxx...
Query Parameters
Name | Type | Required | Description |
---|---|---|---|
package | string | Conditional | ID of the process package. Required if code is not provided. |
code | string | Conditional | Document code of the process. Required if package is not provided. |
userId | string | Optional | ID of the user to retrieve individual attachments and status. |
⚠️ Only one of
package
orcode
must be sent. If both are provided, one will be ignored.
Valid Usage Combinations
Method | Path | Description |
---|---|---|
GET | /attachments?package={packageId} | General process query |
GET | /attachments?code={code} | General process query |
GET | /attachments?package={packageId}&userId={userId} | Query attachments by signer using package |
GET | /attachments?code={code}&userId={userId} | Query attachments by signer using code |
🧪 Usage Examples
tip
You can copy any of the examples depending on your preferred language.
🔹 Get general process information
- curl
- Python
- Node.js
curl --location 'https://api.auco.ai/v1.5/ext/attachments?package=package123' \
--header 'Authorization: puk_yourPublicKey'
import requests
response = requests.get(
"https://api.auco.ai/v1.5/ext/attachments",
headers={"Authorization": "puk_yourPublicKey"},
params={"package": "package123"}
)
print(response.json())
const axios = require('axios');
axios
.get('https://api.auco.ai/v1.5/ext/attachments', {
headers: { Authorization: 'puk_yourPublicKey' },
params: { package: 'package123' },
})
.then((response) => console.log(response.data));
🔸 Get signer attachments using package
and userId
- curl
- Python
- Node.js
curl --location 'https://api.auco.ai/v1.5/ext/attachments?package=package456&userId=userX' \
--header 'Authorization: puk_yourPublicKey'
import requests
response = requests.get(
"https://api.auco.ai/v1.5/ext/attachments",
headers={"Authorization": "puk_yourPublicKey"},
params={"package": "package456", "userId": "userX"}
)
print(response.json())
const axios = require('axios');
axios
.get('https://api.auco.ai/v1.5/ext/attachments', {
headers: { Authorization: 'puk_yourPublicKey' },
params: { package: 'package456', userId: 'userX' },
})
.then((response) => console.log(response.data));
🔸 Get signer attachments using code
and userId
- curl
- Python
- Node.js
curl --location 'https://api.auco.ai/v1.5/ext/attachments?code=codeABC&userId=userY' \
--header 'Authorization: puk_yourPublicKey'
import requests
response = requests.get(
"https://api.auco.ai/v1.5/ext/attachments",
headers={"Authorization": "puk_yourPublicKey"},
params={"code": "codeABC", "userId": "userY"}
)
print(response.json())
const axios = require('axios');
axios
.get('https://api.auco.ai/v1.5/ext/attachments', {
headers: { Authorization: 'puk_yourPublicKey' },
params: { code: 'codeABC', userId: 'userY' },
})
.then((response) => console.log(response.data));
📥 Response Examples
🔹 Without userId
{
"package": "package123",
"name": "Signing Process 001",
"finish": true,
"signers": [
{
"userId": "01",
"email": "user1@example.com",
"name": "User One"
}
]
}
🔸 With userId
{
"package": "package123",
"name": "Signing Process 001",
"finish": true,
"signer": {
"userId": "01",
"email": "user1@example.com",
"name": "User One",
"files": [
{
"name": "ID Document",
"url": "https://..."
},
{
"name": "Proof",
"url": "https://..."
}
],
"status": "approved"
}
}
🔄 Signer Status (status
)
Status | Description |
---|---|
pending | The user has not uploaded any documents yet. |
uploaded | Documents have been uploaded but not fully approved. |
approved | All documents have been uploaded and approved. |
File URLs (
url
) are only included if thestatus
is notpending
.
🔚 Field finish
The finish: true
field means the process has been fully completed and no further actions are expected.
⚠️ Error Responses
Code | Description |
---|---|
400 | Missing package or code , or process not found (ATTACHMENT_NOT_FOUND ) |
401 | Invalid or missing authentication |