What this call does
Removes one or more files from a business document, an order, delivery note or invoice. The document itself stays.
Last updated: 15.05.2026
What you need first
- A valid API key in the
API-Keyheader, and yourcompanyAccountId. - The
businessDocumentId, from Search business documents. - The attachment
idvalues, theidof each entry underattachedFilesin Search business documents, or theidin the answer of Attach files to a business document.
Parameters
Parameter | Required | Default | Meaning |
|---|---|---|---|
| Yes | none | In the path after |
| Yes | none | Your company ID, in the address line. |
The fields
Field | Type | Required | Default | Meaning |
|---|---|---|---|---|
| list of text | Yes | none | The |
id, not the externalId (your own number) and not the documentId (the file's ID in the file store). An ID that does not belong to this document is skipped without a word. Leaving attachmentIds out on a document that has attachments fails with 500 Internal Server Error.What you get back
204 No Content, an empty answer with no text at all. If you see nothing, the call went through. It does not say how many attachments were removed; to check, call Search business documents with this document's ID in ids and read attachedFiles.
Common mistakes
What you see | Why | What to do |
|---|---|---|
| The | Fetch the ID with Search business documents. |
| Key missing, wrong, or not entitled to that | Check the key and the company. |
|
| The field is required. Send at least one ID. |
| The IDs were | Read the |
The file is gone from your own links too | The file is deleted from storage, not only unlinked | Expected. Download first if you need a copy. |
Adresse
DELETE https://api.cathago.de/v3/api/gateways/integration/documents/:documentId/attachments?companyAccountId=<companyAccountId>Beispielaufruf
curl -X DELETE 'https://api.cathago.de/v3/api/gateways/integration/documents/:documentId/attachments?companyAccountId=<companyAccountId>' \
-H 'API-Key: <Ihr API-Schlüssel>' \
-H 'Content-Type: application/json' \
-d '{
"attachmentIds": [
"C0625051306220422",
"C0625051306691163"
]
}'Beispiel für den Body
{
"attachmentIds": [ // Required. The id values from attachedFiles. Not externalId, not documentId
"C0625051306220422", // The id of the first attachment to remove
"C0625051306691163" // As many more as you like. An id not on this document is skipped without a word
]
}Beispielantworten
Delete files from document
Status: 204 No Content