URL: /baas/api/reference/verification-compliance/document-management
---
title: 'Verification Document Management API'
description: 'Upload and manage verification documents'
---
# Verification Document Management API
APIs for uploading and managing documents associated with verification processes.
**Base URL:** `https://sandbox.finhub.cloud`
## Available Operations
`GET /verifications/{id}/documents`
`POST /verifications/{id}/documents`
---
## Get Verification Documents
Retrieves all documents for a specific verification process.
### Request
Verification identifier
Bearer token for authentication
Tenant identifier
Source identifier for request origin tracking
Client application identifier — required by the global request filter
Client platform identifier. Also accepted as `sec-ch-ua-platform`
Unique device identifier for session tracking. Also accepted as `X-Device-Id` or `device-id`
### Code Examples
```bash cURL
curl -X GET "https://sandbox.finhub.cloud/api/v2.1/verifications/ver_12345/documents" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Tenant-ID: 97e7ff29-15f3-49ef-9681-3bbfcce4f6cd" \
-H "X-Forwarded-From: e2e-test" \
-H "User-Agent: YourApp/1.0" \
-H "platform: web" \
-H "deviceId: 356938035643809"
```
```javascript JavaScript
const response = await fetch(
'https://sandbox.finhub.cloud/api/v2.1/verifications/ver_12345/documents',
{
headers: {
'Authorization': `Bearer ${accessToken}`,
'X-Tenant-ID': '97e7ff29-15f3-49ef-9681-3bbfcce4f6cd',
'X-Forwarded-From': 'e2e-test',
'User-Agent': 'YourApp/1.0',
'platform': 'web',
'deviceId': '356938035643809'
}
}
);
const { data } = await response.json();
data.documents.forEach(doc => {
console.log(`${doc.documentType}: ${doc.status}`);
});
```
```python Python
import requests
response = requests.get(
'https://sandbox.finhub.cloud/api/v2.1/verifications/ver_12345/documents',
headers={
'Authorization': f'Bearer {access_token}',
'X-Tenant-ID': '97e7ff29-15f3-49ef-9681-3bbfcce4f6cd',
'X-Forwarded-From': 'e2e-test',
'User-Agent': 'YourApp/1.0',
'platform': 'web',
'deviceId': '356938035643809'
}
)
data = response.json()['data']
for doc in data['documents']:
print(f"{doc['documentType']}: {doc['status']}")
```
```json 200 - Success
{
"success": true,
"data": {
"documents": [
{
"documentId": "doc_12345",
"documentType": "GOVERNMENT_ID",
"status": "VERIFIED",
"uploadedAt": "2024-01-15T10:30:00Z"
},
{
"documentId": "doc_67890",
"documentType": "PROOF_OF_ADDRESS",
"status": "PENDING_REVIEW",
"uploadedAt": "2024-01-15T10:35:00Z"
}
]
}
}
```
---
## Upload Verification Document
Uploads a document for a specific verification process.
### Request
Verification identifier
Type of document: `GOVERNMENT_ID`, `PROOF_OF_ADDRESS`, `SELFIE`, etc.
Optional document ID (for re-uploads)
Bearer token for authentication
Tenant identifier
Uploading user ID
Document file (multipart/form-data)
Document category
### Code Examples
```bash cURL
curl -X POST "https://sandbox.finhub.cloud/api/v2.1/verifications/ver_12345/documents?documentType=GOVERNMENT_ID" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Tenant-ID: 97e7ff29-15f3-49ef-9681-3bbfcce4f6cd" \
-H "X-Forwarded-From: e2e-test" \
-H "User-Agent: YourApp/1.0" \
-H "platform: web" \
-H "deviceId: 356938035643809" \
-F "file=@/path/to/passport.pdf"
```
```javascript JavaScript
const formData = new FormData();
formData.append('file', documentFile);
const response = await fetch(
'https://sandbox.finhub.cloud/api/v2.1/verifications/ver_12345/documents?documentType=GOVERNMENT_ID',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'X-Tenant-ID': '97e7ff29-15f3-49ef-9681-3bbfcce4f6cd',
'X-Forwarded-From': 'e2e-test',
'User-Agent': 'YourApp/1.0',
'platform': 'web',
'deviceId': '356938035643809'
},
body: formData
}
);
const { data } = await response.json();
console.log('Document ID:', data.documentId);
console.log('Status:', data.status);
```
```python Python
import requests
with open('/path/to/passport.pdf', 'rb') as f:
response = requests.post(
'https://sandbox.finhub.cloud/api/v2.1/verifications/ver_12345/documents',
params={'documentType': 'GOVERNMENT_ID'},
headers={
'Authorization': f'Bearer {access_token}',
'X-Tenant-ID': '97e7ff29-15f3-49ef-9681-3bbfcce4f6cd',
'X-Forwarded-From': 'e2e-test',
'User-Agent': 'YourApp/1.0',
'platform': 'web',
'deviceId': '356938035643809'
},
files={'file': f}
)
data = response.json()['data']
print(f"Document ID: {data['documentId']}")
```
```json 201 - Success
{
"success": true,
"data": {
"documentId": "doc_11111",
"verificationId": "ver_12345",
"documentType": "GOVERNMENT_ID",
"status": "UPLOADED",
"uploadedAt": "2024-01-15T10:30:00Z"
}
}
```
```json 400 - Invalid File
{
"success": false,
"error": {
"code": "INVALID_FILE",
"message": "File type not supported. Allowed: PDF, JPG, PNG"
}
}
```
---
## Document Types
| Type | Description |
|------|-------------|
| `GOVERNMENT_ID` | Passport, national ID, driver's license |
| `PROOF_OF_ADDRESS` | Utility bill, bank statement (< 3 months) |
| `SOURCE_OF_FUNDS` | Income proof, tax returns |
| `SELFIE` | Customer selfie for liveness check |
| `CERTIFICATE_OF_INCORPORATION` | Company registration |
| `BENEFICIAL_OWNER_DECLARATION` | UBO declaration |
## Document Statuses
| Status | Description |
|--------|-------------|
| `UPLOADED` | Document uploaded |
| `PENDING_REVIEW` | Awaiting review |
| `VERIFIED` | Document verified |
| `REJECTED` | Document rejected |
## Response Codes
| Code | Description |
|------|-------------|
| `200` | Documents retrieved successfully |
| `201` | Document uploaded successfully |
| `400` | Invalid request data |
| `404` | Verification not found |
| `500` | Internal server error |