Developer Guide
Document API
Document
Endpoints for managing case-related documents. Includes operations for listing, retrieving, downloading, and updating documents and their metadata.
Auth
Authenticated Document API endpoints. All requests in this folder require proper authorization. Covers document metadata retrieval, file downloads, document listing, and expiry updates.
AUTHORIZATION Bearer Token
API Endpoints
List Documents
GET /v2/documents
https://immigo.cibtapis.com/v2/documents?startDate=2024-01-01&endDate=2025-03-01&maxRecords=10&offset=0
Retrieves a paginated list of documents within a specified date range.
Endpoint
| GET /v2/documents |
Parameters example
| startDate | 2024-01-01 |
| endDate | 2025-03-01 |
| maxRecords | 100 |
| offset | 0 |
Query Parameters
| Parameter | Type | Required | Default | Description |
| startDate | string | Yes | — | Start of the date range in YYYY-MM-DD format. |
| endDate | string | Yes | — | End of the date range in YYYY-MM-DD format. |
| maxRecords | integer | No | 10 | Maximum number of records to return per page. |
| offset | integer | No | 0 | Number of records to skip for pagination. Send an empty offset to make use of Cursor based Navigation. |
| nextCursor | string | No | — | Cursor token for fetching the next page of results. Returned in the previous response. |
| prevCursor | string | No | — | Cursor token for fetching the previous page of results. Returned in the previous response. |
Response
Returns a paginated array of document metadata records within the specified date range, including document IDs, types, names, and associated case/applicant references.
Usage Notes
- Use offset and maxRecords for pagination through large results sets.
- If you send an empty offset value, pagination will be based on Cursors.
- Use nextCursor and prevCursor for cursor-based pagination when provided in the response.
- This endpoint returns document metadata only – use the individual document endpoint to retrieve full document details.
Get Document By ID
GET /v2/document/{documentId}
https://immigo.cibtapis.com/v2/document/e7KVLfQeupCyttuedvmYtfBkQ7KrQHLjqm2AlzytsAw=
Retrieves metadata for a specific document by its unique encoded document ID.
Endpoint
| GET /v2/document/{documentId} |
Path Parameters
| Parameter | Type | Required | Description |
| documentId | string | Yes | The unique encoded identifier (Base64) of the document. |
Response
Returns the document metadata record including document type, name, status, expiry information, and associated case/applicant references.
Usage Notes
- This endpoint returns document metadata only, not the file
- To download the actual file, use document/{documentId}/file instead.
- The documentId is a Base640encoded unique identifier.
- To update the document’s expiry date, use document/{documentId}/expiry.
Download Document
GET /v2/document/{documentId}/file
https://immigo.cibtapis.com/v2/document/e7KVLfQeupCyttuedvmYtU3xmjaH_e1IHda91ufvK8w=/file
Downloads the actual file content for a specific document by its unique encoded document ID.
Endpoint
| GET /v2/document/{documentId}/file |
Path Parameters
| Parameter | Type | Required | Description |
| documentId | string | Yes | The unique encoded identifier (Base64) of the document. |
Response
Returns the binary file content of the document. The Content-Type header in the response indicates the file format (e.g., application/pdf, image/jpeg)
Usage Notes
- This endpoint returns the actual file content, not metadata.
- For document metadata, use document/{documentId} instead.
- The response may be a large binary payload depending on the document.
- Ensure your client handles binary responses.
Patch Document Expiry
PATCH /v2/document/{documentId}/expiry
https://immigo.cibtapis.com/document/e7KVLfQeupCyttuedvmYtZ3DWQhE7DD32wwgwxn4ZlA=/expiry
Updates the expiry date and renewal reminder settings for a specific document.
Endpoint
| PATCH /v2/document/{documentId}/expiry |
Path Parameters
| Parameter | Type | Required | Description |
| documentId | string | Yes | The unique encoded identifier (Base64) of the document. |
Request Body
Content-Type: application-json
| Field | Type | Required | Description |
| ExpiryDate | string | Yes | The new expiry date for the document (ISO 8601 format). |
| RemindAboutRenewal | boolean | No | Whether to enable renewal reminders for this document. |
| ExpiryReminder | string | No | The reminder schedule or date for expiry notifications. |
Usage Notes
- Use this endpoint to manage document expiry tracking and renewal
- Only the expiry-related fields are updated — other document metadata remains
- The ReminderAboutRenwal flag controls whether automated renewal notifications are sent.
- For retrieving document metadata, use document/documentId instead.
Body (raw json)
{
"ExpiryDate": "2025-12-31",
"RemindAboutRenewal": true,
"ExpiryReminder": 31
}
Upload Document
POST /v2/document
https://immigo.cibtapis.com/document
Uploads a document file to a specified S3 bucket, associated with a given case.
Endpoint
| POST /v2/document |
Request Body
Sent as multipart/form-data
| Field | Type | Description |
| document | File | The document file to upload. |
| caseId | String | The encrypted identifier of the case this document is associated with. |
| countryCode | String | The country code for document repository. Allowed values are “US”, “EDU”, “UK”, “FR”, “DE”, “IR”, “ES”, “CH”.
|
Usage Notes
- The caseId is an encrypted/encoded string.
- Ensure the document parameter has a valid file content for upload.
Get Health Check
GET /v2/document/health
https://immigo.cibtapis.com/v2/document/health
Performs a health check on the Document API service. Returns the current health status to verify the service is running and responsive.
Endpoint
| GET /v2/document/health |
Parameters
No path parameters, query parameters, or request body required.
Response
Returns the health status of the Document API service, typically including service availability and uptime information.
Usage Notes
- Use this endpoint for monitoring and alerting.
- A successful response indicates the Document API service is running.