What this call does
Downloads every file attached to one business document, an order, delivery note or invoice, as a single ZIP archive.
Last updated: 15.05.2026
POST /api/gateways/integration/documents/{documentId}/download. The address that answers is GET /api/documents/{businessDocumentId}/attachments/download, a GET, and it takes no companyAccountId.What you need first
- A valid API key in the
API-Keyheader. - The
businessDocumentId, theidfield from Search business documents. - A client that can save a binary answer as a file.
Parameters
Parameter | Required | Default | Meaning |
|---|---|---|---|
| Yes | none | In the path, between |
There are no query parameters.
The fields
This call has no data packet. Do not send one.
What you get back
200 OK, content type application/zip, with the header Content-Disposition: attachment; filename="documents-{businessDocumentId}.zip".
One entry per attachment, named after its fileName; a file with no name is stored as file, and a repeated name gets (1), (2) … before the extension. An ORDER in status IN_APPROVAL carries one extra file, an order preview named Vorschau Bestellung {externalId}.pdf. A document with no attachments returns 200 and a valid, empty archive.
200 does not promise that every attachment is in the archive. A file that cannot be fetched is skipped in silence.Common mistakes
What you see | Why | What to do |
|---|---|---|
| The saved | Use the |
| Called with | It is a |
| Key missing or wrong | A staging key does not work in production. |
The file will not open | The answer was saved as text | It is a ZIP archive. Save the bytes as they arrive. |
A file you expected is missing | It could not be fetched, so it was skipped | Read |
Adresse
POST https://api.cathago.de/api/gateways/integration/documents/:documentId/download?companyAccountId=<companyAccountId>Beispielaufruf
curl -X POST 'https://api.cathago.de/api/gateways/integration/documents/:documentId/download?companyAccountId=<companyAccountId>' \
-H 'API-Key: <Ihr API-Schlüssel>'Beispielantworten
OK
Status: 200 OK