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 checks the uploaded object’s content type and size against what was declared 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 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 acode and a params object in the body.

