Skip to main content

Upload Sales Invoice Document

POST 

/api/sales-invoices/:salesInvoice/documents

Attach a file to the invoice. Send as multipart/form-data.

Required scope: orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

  • file (required): accepted types pdf, jpg, jpeg, png, gif, webp, heic, doc, docx, xls, xlsx, csv, txt, html, htm, eml, msg, zip; maximum 20 MB. The extension decides the type; files whose contents are an executable or script are rejected whatever they are named.
  • description (optional, up to 2,000 characters): what the file is and where it came from.

Returns the stored document. Returns 422 on an order invoice (kind order_mirror) — attach the file to the sales order instead.

Requires orders:write and sales_invoices.update.

Request​

Responses​

OK

Response Headers
    Content-Type