Marmin

Download attachment


Downloads a supporting document attachment by ID. Returns the file bytes stored when the attachment was uploaded on create or update.

This endpoint is separate from Download Sale Invoice PDF (/download-pdf), which returns the rendered invoice PDF only.

Path parameters

ParameterTypeRequiredDescription
idstring
Required
The UUID of the sales invoice.
attachmentIdstring
Required
The attachment id from the document response attachments array.
Response

Status code: 200 OK

Response headers:

HeaderDescription
Content-TypeStored MIME type of the attachment (e.g. application/pdf).
Content-Dispositionattachment; filename="..." using the stored file name.
X-Suggested-FilenameSuggested file name for clients that prefer a dedicated header.

Response body: Raw file bytes (not JSON).

Error responses

StatusDescription
401 UnauthorizedAuthentication required or invalid token.
404 Not FoundInvoice or attachment not found.
500 Internal Server ErrorAn error occurred while processing the request.
Next