Skip to main content

Documents

Overview

Documents endpoints provide document listing, creation, management, and file operations.

Endpoint Summary

MethodRoutePurpose
GET/v1/documentsList documents
POST/v1/documentsCreate document
GET/v1/documents/{documentId}Get document by ID
PUT/v1/documents/{documentId}Update document
DELETE/v1/documents/{documentId}Delete document
GET/v1/documents/{documentId}/filesList files
POST/v1/documents/{documentId}/filesAttach files
DELETE/v1/documents/{documentId}/filesRemove files
GET/v1/documents/{documentId}/files/{fileId}/downloadDownload attached file

GET /v1/documents

Return paginated documents for the selected entity scope.

Headers

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
AcceptYesapplication/json

Query Parameters

ParameterTypeRequiredDescription
entity_typestringYesDocument scope entity type (for example case, task, expat, assignment).
entity_idnumberYesScoped entity identifier.
pagenumberNoPage number.
per_pagenumberNoItems per page.
search_textstringNoSearch value.
orderstringNoSort field.
order_directionstringNoasc or desc.
statusarrayNoStatus filter values.
tag_idsarray<number>NoTag filter values.
document_type_idnumberNoDocument type filter.
country_codestringNoCountry filter.
linked_entity_typestringNoLinked resource filter.
includearray<string>NoInclude options (filters, details, files).

Example Request

curl -X GET "{{BASE_URL}}/v1/documents?entity_type=case&entity_id=590&page=1&per_page=20" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"

Success Response (200)

{
"success": true,
"result": {
"currentPage": 1,
"perPage": 20,
"lastPage": 1,
"total": 1,
"items": [
{
"id": 1300,
"entity_id": 590,
"entity_type": "case",
"created_by": {
"id": 501,
"text": "John Manager"
},
"number": "DOC-2026-001",
"name": "Visa Approval",
"status_id": 1,
"status_label": "Active",
"expiration_date": "2027-05-31",
"created_at": "2026-05-02",
"document_type": {
"id": 7,
"text": "Immigration Document"
},
"file_type": "pdf",
"country": {
"id": 80,
"alpha2": "DE",
"name": "Germany"
},
"can_update": true,
"can_delete": true,
"service_category": {
"id": 3,
"name": "Immigration"
},
"expat_name": "Jane Doe",
"client_name": "Example Client Ltd",
"reminder_date": null,
"case_id": 590,
"tags": [],
"files": [
{
"id": 4501,
"type": "pdf",
"key_path": "documents/2026/05/visa-approval.pdf",
"size": 208734,
"file_path": "https://cdn.example.com/documents/2026/05/visa-approval.pdf",
"name": "visa-approval"
}
]
}
],
"filters": []
}
}

POST /v1/documents

Create a document in an entity scope.

Headers

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
Content-TypeYesmultipart/form-data
AcceptYesapplication/json

Multipart Fields

FieldTypeRequiredDescription
entity_typestringYesDocument scope entity type.
entity_idnumberYesScoped entity identifier.
file[]fileYesOne or more document files.
document_type_idnumberYesDocument type identifier.
namestringNoDocument name.
numberstringNoDocument number.
expiration_datestringNoExpiration date (YYYY-MM-DD).
country_codestringNoCountry ISO2 code.
service_category_idnumberNoService category identifier.
status_idnumberNoStatus identifier.
multiplebooleanNoMultiple file processing flag.
case_idnumberNoLinked case identifier.

Example Request

curl -X POST "{{BASE_URL}}/v1/documents" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json" \
-F "entity_type=case" \
-F "entity_id=590" \
-F "document_type_id=7" \
-F "name=Visa Approval" \
-F "number=DOC-2026-001" \
-F "expiration_date=2027-05-31" \
-F "country_code=DE" \
-F "file[]=@/path/to/visa-approval.pdf"

Success Response (200)

{
"success": true,
"result": {
"document": {
"id": 1300,
"entity_id": 590,
"created_by": {
"id": 501,
"text": "John Manager"
},
"number": "DOC-2026-001",
"name": "Visa Approval",
"status_id": 1,
"status_label": "Active",
"expiration_date": "2027-05-31",
"created_at": "2026-05-02",
"document_type": {
"id": 7,
"text": "Immigration Document"
},
"country": {
"id": 80,
"alpha2": "DE",
"name": "Germany"
},
"service_category": {
"id": 3,
"name": "Immigration"
},
"entity_type": "case",
"can_update": true,
"can_delete": true,
"reminder_date": null,
"case_id": 590,
"files": [
{
"id": 4501,
"type": "pdf",
"key_path": "documents/2026/05/visa-approval.pdf",
"size": 208734,
"file_path": "https://cdn.example.com/documents/2026/05/visa-approval.pdf",
"name": "visa-approval"
}
],
"tags": []
}
}
}

GET /v1/documents/{documentId}

Return one document by ID.

Headers

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
documentIdnumberYesDocument identifier.

Example Request

curl -X GET "{{BASE_URL}}/v1/documents/{{DOCUMENT_ID}}" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"

Success Response (200)

{
"success": true,
"result": {
"document": {
"id": 1300,
"entity_id": 590,
"created_by": {
"id": 501,
"text": "John Manager"
},
"number": "DOC-2026-001",
"name": "Visa Approval",
"status_id": 1,
"status_label": "Active",
"expiration_date": "2027-05-31",
"created_at": "2026-05-02",
"document_type": {
"id": 7,
"text": "Immigration Document"
},
"country": {
"id": 80,
"alpha2": "DE",
"name": "Germany"
},
"service_category": {
"id": 3,
"name": "Immigration"
},
"entity_type": "case",
"can_update": true,
"can_delete": true,
"reminder_date": null,
"case_id": 590,
"files": [
{
"id": 4501,
"type": "pdf",
"key_path": "documents/2026/05/visa-approval.pdf",
"size": 208734,
"file_path": "https://cdn.example.com/documents/2026/05/visa-approval.pdf",
"name": "visa-approval"
}
],
"tags": []
}
}
}

PUT /v1/documents/{documentId}

Update document metadata.

Headers

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
Content-TypeYesapplication/json
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
documentIdnumberYesDocument identifier.

Request Body Fields

FieldTypeRequiredDescription
document_type_idnumberYesDocument type identifier.
namestringNoDocument name.
numberstringNoDocument number.
expiration_datestringNoExpiration date (YYYY-MM-DD).
country_codestringNoCountry ISO2 code.
service_category_idnumberNoService category identifier.

Example Request

curl -X PUT "{{BASE_URL}}/v1/documents/{{DOCUMENT_ID}}" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"document_type_id": 7,
"name": "Visa Approval Updated",
"number": "DOC-2026-001A",
"expiration_date": "2027-06-30",
"country_code": "DE"
}'

Success Response (200)

{
"success": true,
"result": {
"document": {
"id": 1300,
"entity_id": 590,
"created_by": {
"id": 501,
"text": "John Manager"
},
"number": "DOC-2026-001A",
"name": "Visa Approval Updated",
"status_id": 1,
"status_label": "Active",
"expiration_date": "2027-06-30",
"created_at": "2026-05-02",
"document_type": {
"id": 7,
"text": "Immigration Document"
},
"country": {
"id": 80,
"alpha2": "DE",
"name": "Germany"
},
"service_category": {
"id": 3,
"name": "Immigration"
},
"entity_type": "case",
"can_update": true,
"can_delete": true,
"reminder_date": null,
"case_id": 590,
"files": [
{
"id": 4501,
"type": "pdf",
"key_path": "documents/2026/05/visa-approval.pdf",
"size": 208734,
"file_path": "https://cdn.example.com/documents/2026/05/visa-approval.pdf",
"name": "visa-approval"
}
],
"tags": []
}
}
}

DELETE /v1/documents/{documentId}

Delete a document.

Headers

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
documentIdnumberYesDocument identifier.

Example Request

curl -X DELETE "{{BASE_URL}}/v1/documents/{{DOCUMENT_ID}}" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"

Success Response (200)

{
"success": true,
"result": {
"success": true
}
}

GET /v1/documents/{documentId}/files

Return attached files for a document.

Headers

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
documentIdnumberYesDocument identifier.

Example Request

curl -X GET "{{BASE_URL}}/v1/documents/{{DOCUMENT_ID}}/files" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"

Success Response (200)

{
"success": true,
"result": {
"files": [
{
"id": 4501,
"type": "pdf",
"key_path": "documents/2026/05/visa-approval.pdf",
"size": 208734,
"file_path": "https://cdn.example.com/documents/2026/05/visa-approval.pdf",
"name": "visa-approval"
}
]
}
}

POST /v1/documents/{documentId}/files

Attach files to an existing document.

Headers

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
Content-TypeYesmultipart/form-data
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
documentIdnumberYesDocument identifier.

Multipart Fields

FieldTypeRequiredDescription
file[]fileYesOne or more files to attach.

Example Request

curl -X POST "{{BASE_URL}}/v1/documents/{{DOCUMENT_ID}}/files" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json" \
-F "file[]=@/path/to/appendix.pdf"

Success Response (200)

{
"success": true,
"result": {
"document": [
{
"id": 4501,
"type": "pdf",
"key_path": "documents/2026/05/visa-approval.pdf",
"size": 208734,
"file_path": "https://cdn.example.com/documents/2026/05/visa-approval.pdf",
"name": "visa-approval"
},
{
"id": 4502,
"type": "pdf",
"key_path": "documents/2026/05/appendix.pdf",
"size": 102300,
"file_path": "https://cdn.example.com/documents/2026/05/appendix.pdf",
"name": "appendix"
}
]
}
}

DELETE /v1/documents/{documentId}/files

Remove one or more attached files.

Headers

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
Content-TypeYesapplication/json
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
documentIdnumberYesDocument identifier.

Request Body Fields

FieldTypeRequiredDescription
file_idsarray<number>YesFile IDs to remove.

Example Request

curl -X DELETE "{{BASE_URL}}/v1/documents/{{DOCUMENT_ID}}/files" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"file_ids": [4502]
}'

Success Response (200)

{
"success": true,
"result": {
"success": true
}
}

GET /v1/documents/{documentId}/files/{fileId}/download

Return a downloadable URL for a document file.

Headers

HeaderRequiredValue
AuthorizationYesBearer {{ACCESS_TOKEN}}
AcceptYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
documentIdnumberYesDocument identifier.
fileIdnumberYesFile identifier.

Example Request

curl -X GET "{{BASE_URL}}/v1/documents/{{DOCUMENT_ID}}/files/{{FILE_ID}}/download" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"

Success Response (200)

{
"success": true,
"result": "https://cdn.example.com/signed/documents/2026/05/visa-approval.pdf?signature=..."
}