Developers
Guides

Download a PDF

A document’s PDF, in the language you want, rendered with the workspace template.

Every business document has its PDF, rendered by the ERP with the workspace’s document template (logo, legal mentions, layout) — exactly the one the application prints or emails. Required key: the document’s read scope (sales:read for sales, purchases:read for purchases).

Download the PDF

The route is the same for every kind: GET /<documents>/{id}/pdf. The 200 response body is the file itself (Content-Type: application/pdf), not a JSON envelope:

GET/sales/invoices/{id}/pdf

curl 'https://quosuite.com/api/public/v1/quosuite/sales/invoices/5b0e7c1a-2f3d-4e8b-9a6c-1d2e3f4a5b6c/pdf?lang=en' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -o 'invoice.pdf'
DocumentRoute
Quote/sales/quotes/{id}/pdf
Sales order/sales/orders/{id}/pdf
Delivery note/sales/delivery-notes/{id}/pdf
Invoice/sales/invoices/{id}/pdf
Credit note/sales/credit-notes/{id}/pdf
Purchase order/purchases/orders/{id}/pdf
Goods receipt/purchases/receipts/{id}/pdf
Supplier invoice/purchases/invoices/{id}/pdf

Choose the language

The PDF follows the requested language: ?lang=fr|en|ar, otherwise the Accept-Language header, otherwise the workspace language. In Arabic, the page is rendered mirrored, right to left.

GET/sales/invoices/{id}/pdf

curl 'https://quosuite.com/api/public/v1/quosuite/sales/invoices/5b0e7c1a-2f3d-4e8b-9a6c-1d2e3f4a5b6c/pdf?lang=ar' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -o 'invoice.pdf'

Only generated labels (column headers, statuses, ERP mentions) change language; what you entered — item names, notes, terms — stays as is.

On error

An error, on the other hand, answers in JSON, with the usual shape: check the status before writing the file, or you will save an error message under the name invoice.pdf.

StatusCause
404 NOT_FOUNDdocument missing, of another kind (a quote requested on the invoices route) or from another workspace
403 API_INSUFFICIENT_SCOPEthe key lacks the document’s read scope