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

ParameterTypeRequiredDescription
document_idstringYesThe identifier for the Document.

Example

{
  "document_id": "d_1rQYvnUQdcatd4TcZQu0l8"
}

Response

Data

ParameterTypeDescription
documentobjectAn object containing the download URL for the document.

Object Parameters

ParameterTypeDescription
download_urlstringThe 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 CodeHTTP CodePossible Cause
BAD_REQUEST 400Required parameters not provided.
Invalid values provided.
ENTITY_NOT_FOUND 400The document_id provided does not exist.