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
- Presign:
POST …/presignwith the file metadata. The server returns anattachmentIdand a signedurl. - Upload:
PUTthe file bytes to the signed URL from your client (not through the ERP API). - Confirm:
POST …/confirmwith theattachmentIdand displayfilename. The server reads the stored object metadata and creates the attachment record.
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
ReturnsPresignResult.
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
ReturnsAttachmentWithoutObjectKey.
Example
List attachments
Retrieve all attachments linked to a host resource.GET /api/entities/:entityId/invoices/:invoiceId/attachments
Path parameters
Response
Returns an array ofAttachmentWithoutObjectKey.
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
ReturnsAttachmentUrl.
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