KausateKausate Docs
Retrieve document

Retrieve document: order (async)

Place a document retrieval order. Poll GET /v2/companies/documents/{orderId} or subscribe via webhook.

When to use it

Retrieve one document from a document list by its kausateDocumentId. The completed order returns a downloadLink to the original file. The same document for the same company on the same UTC day is not charged again.

Example

curl -X POST https://api.kausate.com/v2/companies/documents \
  -H "X-API-Key: your_api_key" \
  -H "Kausate-Version: 2026-08-01" \
  -H "Content-Type: application/json" \
  -d '{
    "kausateId": "co_zz_4O3wnpE5u1K5AXnkARuhp",
    "kausateDocumentId": "doc_zz-sandbox_4dfb09fa18c01b47facd01c6f593bc21"
  }'

The completed order (GET resultUrl), with a placeholder in place of the link's token:

{
  "orderId": "co_zz_4O3wnpE5u1K5AXnkARuhp-download-doc_zz-sandbox_4dfb09fa18c01b47facd01c6f593bc21-raw-org_01ABC-20261121130000",
  "kausateId": "co_zz_4O3wnpE5u1K5AXnkARuhp",
  "companyName": "Sandbox Logistics GmbH",
  "customerReference": null,
  "metadata": null,
  "customerId": null,
  "status": "completed",
  "requestTime": "2026-11-21T13:00:00Z",
  "responseTime": "2026-11-21T13:00:00Z",
  "result": {
    "type": "document",
    "downloadLink": "https://api.kausate.com/documents/example-token/download",
    "kausateDocumentId": "doc_zz-sandbox_4dfb09fa18c01b47facd01c6f593bc21",
    "documentType": "annualReport",
    "expiresAt": null,
    "contentType": "application/pdf",
    "fileName": "zz_sandbox_820001.pdf"
  },
  "error": null,
  "code": null,
  "currentActivity": null,
  "waitingMessage": null,
  "cachedOrder": false
}

Download the file:

curl --fail --location "$DOWNLOAD_LINK" --output annual-report-2024.pdf

Anyone holding downloadLink can download the file without an API key, so keep it private. Append ?convertPdf=true to receive a single PDF when the original is HTML/XHTML or a ZIP of PDFs; other sources return HTTP 422.

POST
/v2/companies/documents
X-API-Key<token>

Sign up at Kausate.com to get an API key

In: header

Query Parameters

batch?boolean

Set to true for batch orders: many orders you submit together and do not need answered immediately. They run at a lower priority than interactive orders.

Defaultfalse

Header Parameters

Kausate-Version?string
Default"2026-08-01"
Formatdate
X-Customer-Id?|

Optional customer ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.kausate.com/v2/companies/documents" \  -H "X-API-Key: $KAUSATE_API_KEY" \  -H "Kausate-Version: 2026-08-01" \  -H "Content-Type: application/json" \  -d '{  "kausateId": "co_zz_4O3wnpE5u1K5AXnkARuhp",  "kausateDocumentId": "doc_zz-sandbox_4dfb09fa18c01b47facd01c6f593bc21"}'
{
  "orderId": "co_de_4JFFrsbQ99t1nmRw2JgzmG-download-DEHRAD-partner-berlin-001-org_01ABC-20240319",
  "customerReference": "doc-order-123",
  "metadata": {
    "team": "kyb",
    "ticket": "ACME-42"
  },
  "customerId": "partner-berlin-001",
  "cachedOrder": false,
  "resultUrl": "/v2/companies/documents/co_de_4JFFrsbQ99t1nmRw2JgzmG-download-DEHRAD-partner-berlin-001-org_01ABC-20240319?customerId=partner-berlin-001"
}
{
  "detail": "Invalid company ID format",
  "code": "request.invalid",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}
{
  "detail": "API key is required",
  "code": "auth.unauthorized",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}
{
  "detail": "Invalid API key",
  "code": "auth.forbidden",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}
{
  "detail": "Company not found",
  "code": "company.not_found",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}
{
  "detail": [
    {
      "loc": [
        "body",
        "kausateId"
      ],
      "msg": "Field required",
      "type": "missing"
    }
  ],
  "code": "request.invalid",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}
{
  "detail": "The data source is rate-limiting requests right now, please try again later",
  "code": "source.rate_limited",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}
{
  "detail": "An unexpected error occurred. If this persists, please contact support@kausate.com",
  "code": "internal.unexpected",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}
{
  "detail": "This capability is offered for the requested jurisdiction but is not usable right now because of a fault on our side. Please contact support@kausate.com",
  "code": "capability.not_available",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}
{
  "detail": "Network error while reaching the data source",
  "code": "source.network_error",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}
{
  "detail": "Data source temporarily unavailable",
  "code": "source.unavailable",
  "request_id": "req_01J8Z5V4Q2X9N7B3C6D1E0F2G4"
}

Last updated on