Skip to main content
The Attachments API lets you associate files with invoices, bank movements, and general ledger entries. Every host follows the same two-phase upload pattern: request a presigned S3 URL, PUT the file from your client, then confirm the upload so the record is created. You can list attachments, fetch a temporary download URL, and remove an attachment when it is no longer needed. All three hosts share the same five endpoints. Replace the host path segment with the resource you are targeting.

Supported hosts

Two-phase upload flow

  1. Presign: POST …/presign with the file metadata. The server returns an attachmentId and a signed url.
  2. Upload: PUT the file bytes to the signed URL from your client (not through the ERP API).
  3. Confirm: POST …/confirm with the attachmentId and display filename. The server reads the stored object metadata and creates the attachment record.
Accepted content types: application/pdf, image/png, image/jpeg, application/xml, text/xml, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet. Maximum file size is 25 MB.

Presign an upload

Request a presigned S3 URL and an attachment ID before uploading file bytes. POST /api/entities/:entityId/invoices/:invoiceId/attachments/presign

Path parameters

Body parameters

Response

Returns PresignResult.

Example

Confirm an upload

After PUTting the file to the presigned URL, confirm the upload to create the attachment record and link it to the host resource. POST /api/entities/:entityId/invoices/:invoiceId/attachments/confirm

Path parameters

Body parameters

Response

Returns AttachmentWithoutObjectKey.

Example

List attachments

Retrieve all attachments linked to a host resource. GET /api/entities/:entityId/invoices/:invoiceId/attachments

Path parameters

Response

Returns an array of AttachmentWithoutObjectKey.

Example

Get a download URL

Generate a temporary signed URL to download a specific attachment. GET /api/entities/:entityId/invoices/:invoiceId/attachments/:attachmentId/url

Path parameters

Response

Returns AttachmentUrl.

Example

Delete an attachment

Remove an attachment and its link to the host resource. The response has no body. DELETE /api/entities/:entityId/invoices/:invoiceId/attachments/:attachmentId

Path parameters

Response

204 No Content

Example

Response schemas

Status codes