What this call does
Attaches one or more further files to an existing framework contract, works certificates, price appendices, specifications.
Last updated: 15.05.2026
What you need first
A valid API key in the API-Key header, your companyAccountId, the CATHAGO id of the contract, and one source per file.
Parameters
Parameter | Required | Default | Meaning |
|---|---|---|---|
| Yes | none | In the address line. The CATHAGO id of the contract. |
| Yes | none | In the address line. Required, but not checked against the contract. |
The fields
The request is a list. Each entry is one file, processed in the order you sent them. No field has a default.
Field | Type | Required | Meaning |
|---|---|---|---|
| text | No | Your own document number. Recommended: it is handed back in the answer, so you can reconcile. |
| text | one source | The file is already at CATHAGO. Loses to the two below. |
| text | one source | CATHAGO fetches the file itself, without a login and without VPN. Loses to |
| text | one source | The file as base64 text. Wins over the other two. |
| text | No | File name CATHAGO stores and shows. Ignored with a |
| choice | with a URL or bytes |
|
| text | No | Free text, e.g. |
What you get back
200 OK with a list, in the order you sent them. Each entry has id (the attachment id: this is what Remove extra files from a contract wants, not documentId), your externalId, documentId, fileName, url (where the file can be fetched), attachmentType, createdAt and lastModifiedAt (2026-05-15T10:22:41.883Z). Attachments are added on top of whatever the contract already had; nothing is replaced.
400, no error entry, the answer simply has fewer rows than you sent, so 200 does not mean every file arrived. Count the rows and match them by externalId.Common mistakes
What you see | Why | What to do |
|---|---|---|
Fewer entries came back, or the answer is | Those entries had all three sources empty and were dropped | Fill in exactly one source per entry, and reconcile by |
The wrong file was attached | Two sources were filled in; the later one won | Send only one source per entry. |
| The contract id does not exist; there is no | Use the CATHAGO |
|
| Send |
| Key missing, unknown, disabled or expired; or the | Check the |
Adresse
POST https://api.cathago.de/v3/api/gateways/integration/contracts//attachments?companyAccountId=<companyAccountId>Beispielaufruf
curl -X POST 'https://api.cathago.de/v3/api/gateways/integration/contracts//attachments?companyAccountId=<companyAccountId>' \
-H 'API-Key: <Ihr API-Schlüssel>' \
-H 'Content-Type: application/json' \
-d '[
{
"externalId": "ATT-DIN488-ZEUGNIS",
"documentUrl": "https://erp.weber-bau.de/dokumente/din488-zeugnis.pdf",
"documentName": "DIN-488-Werkszeugnis.pdf",
"documentFormat": "PDF",
"attachmentType": "CERTIFICATE"
},
{
"externalId": "ATT-PREISANLAGE",
"documentId": "C0626051233311345",
"attachmentType": "APPENDIX"
}
]'Beispiel für den Body
[
{
"externalId": "ATT-DIN488-ZEUGNIS", // Optional. Your own document number, handed back in the answer
"documentUrl": "https://erp.weber-bau.de/dokumente/din488-zeugnis.pdf", // One source per file. Must be reachable without a login or VPN
"documentName": "DIN-488-Werkszeugnis.pdf", // Optional. File name Cathago stores and shows
"documentFormat": "PDF", // Required with documentUrl or fileInBytes. PDF, DOC, JPEG, JPG, PNG, DOCX, CSV, XLSX, XLS, XML, JSON, DAT, WDA
"attachmentType": "CERTIFICATE" // Optional. Free text, stored and shown exactly as sent
},
{ // Second entry - same fields as above
"externalId": "ATT-PREISANLAGE",
"documentId": "C0626051233311345", // File already at Cathago, so only the id is given
"attachmentType": "APPENDIX"
}
]Beispielantworten
Example 1, add 2 attachments (200 streamed)
Status: 200 OK
[
{
"id": "A-77731-1",
"externalId": "ATT-INSPECTION-CERT",
"documentId": "C0626051233311344",
"fileName": "DIN-488-Cert.pdf",
"url": "https://docs.cathago.de/contract-pdfs/C0626051233311344",
"attachmentType": "CERTIFICATE",
"createdAt": "2026-05-15T09:23:01Z"
},
{
"id": "A-77731-2",
"externalId": "ATT-PRICE-APPENDIX",
"documentId": "C0626051233311345",
"fileName": "Price-Appendix.pdf",
"url": "https://docs.cathago.de/contract-pdfs/C0626051233311345",
"attachmentType": "APPENDIX",
"createdAt": "2026-05-15T09:23:02Z"
}
]Example 2, add 1 attachment by existing documentId (200)
Status: 200 OK
[
{
"id": "A-77731-9",
"documentId": "C0626051233311349",
"attachmentType": "SUPPORTING_DOC",
"createdAt": "2026-05-15T09:25:00Z"
}
]Example 3, 404 contract not found
Status: 404 Not Found
{
"timestamp": "2026-05-15T09:25:00Z",
"status": 404,
"error": "Not Found",
"message": "Contract not found for ID: does-not-exist"
}