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 upload 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.
Open in the app. This resource has a page in the Sintropix web app at https://app.sintropix.com/{entityId}/invoices?open={invoiceId}, where each id in braces is the same UUID as in the API route or response. Attachments appear inside the Invoice panel. Use /{entityId}/bills?open={invoiceId} when the Invoice direction is payable. When you mention a record to a user, include that link. See Link to the App for the full URL grammar.

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 checks the uploaded object’s content type and size against what was declared 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 upload URL and an attachment ID before uploading file bytes. POST /api/entities/:entityId/invoices/:invoiceId/attachments/presign

Path parameters

Body parameters

Response

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 the attachment record.

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 attachment records, each with the same fields as the confirm response (id, entityId, filename, contentType, byteSize, createdAt, updatedAt).

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

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

Error codes

Attachment domain errors carry a code and a params object in the body.