document.getDownload
Generate and retrieve a presigned URL for downloading a specific document.
POST http://api.kompliant.com/document.getDownload (OpenAPI specification)
Usage Info
This method generates a temporary URL that allows secure download of a document file. The presigned URL expires after 5 minutes and can only be used to download the specific document.
Use this method when you need to provide users with secure access to download documents, retrieve document files for processing or verification, or enable document downloads in your application without exposing storage credentials. This endpoint requires the document upload_status of COMPLETED and validates that the document exists and is accessible to the requester.
Request
Authentication: KSig1-HMAC-SHA256
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| document_id | string | Yes | The identifier for the Document. |
Example
{
"document_id": "d_1rQYvnUQdcatd4TcZQu0l8"
}
Response
Data
| Parameter | Type | Description |
|---|---|---|
| document | object | An object containing the download URL for the document. |
Object Parameters
| Parameter | Type | Description |
|---|---|---|
| download_url | string | The URL for downloading the document. This URL is temporary and will expire after a set period. |
Example
{
"meta": {
"status": "SUCCESS",
"trace_id": "trc_6OI5blm21ZoSlq0PC3RqJV",
"version": "2025-03-24"
},
"data": {
"document": {
"download_url": "https://download-url"
}
}
}
Errors
| Error Code | HTTP Code | Possible Cause |
|---|---|---|
| BAD_REQUEST | 400 | Required parameters not provided. Invalid values provided. |
| ENTITY_NOT_FOUND | 400 | The document_id provided does not exist. |
Updated 7 months ago