Skip to main content

Download Document

The Download Document API allows you to retrieve the actual file content for a specific document. This endpoint is used to download identity documents, proof of address, certificates, and other files that have been previously uploaded to the system.

API Endpoint

GET {base_url}/ExtForm/submissions/{submissionId}/documents/{documentId}/download

Request Format

This endpoint accepts a GET request with submission ID and document ID parameters in the URL path.

Path Parameters

ParameterTypeRequiredDescription
submissionIdstringYesThe unique identifier of the submission containing the document
documentIdstringYesThe unique identifier of the document to download

Request Headers

Authorization: Bearer {token}

Response Format

The response is a binary file stream with appropriate content type headers for the document being downloaded.

Response Headers

Content-Type: [MIME type of the document]

The Content-Type header will be set to the MIME type of the document (e.g., "image/jpeg", "application/pdf", "image/png"). If the content type is not available in the document metadata, it will be determined based on the file extension.

Response Body

The response body contains the binary content of the requested document.

Example Usage

cURL Example

curl -X GET \
{base_url}/ExtForm/submissions/7ac9ab5e-4123-4456-b8c3-123456789012/documents/a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6/download \
-H 'Authorization: Bearer your_token_here' \
--output downloaded_document.pdf

Error Handling

Status CodeDescriptionSolution
400Invalid submission ID or document IDCheck that the IDs are correctly formatted
401UnauthorizedVerify your authentication token
403ForbiddenCheck that your account has permission to access this document
404Submission or document not foundVerify that both the submission ID and document ID exist
500Internal server errorContact support with the error details

Important Notes

  1. This API returns the actual document content as a binary stream, not just metadata.
  2. You should first use the Get Submission Documents API to retrieve document metadata before downloading.
  3. For large documents, consider implementing timeout handling and resumable downloads in your client application.
  4. The document is accessed within the context of its submission, enforcing proper access control.