invoice_pdf
Make the PDF of an issued invoice (or of its receipt once paid): the same document as its print-ready page, printed on A4 with the business's fonts, brand colours and logo, and kept, so asking again for an unchanged invoice returns the stored file (cached: true) without printing it again. Totals are the stored figures (the same numbers invoice_read gives). It prepares a file and sends nothing. Returns version, pdf_path (downloads while signed in), and download_url when signed links are on; while they are off, download_url_unavailable says why and pdf_path still works. Refusals: a draft is refused CONFLICT SIMPLER_SALES_PDF_NOT_ISSUED (issue it first with invoice_update status 'sent'); a cancelled invoice is refused CONFLICT SIMPLER_SALES_PDF_CANCELLED; an unknown id is NOT_FOUND (find it with invoice_list); more than 50 new PDFs in 24 hours is refused RATE_LIMITED SIMPLER_SALES_PDF_DAILY_CAP (wait retry_after seconds; stored PDFs still download); when PDF printing is unavailable (no browser here, printer busy or failing) it answers SERVICE_UNAVAILABLE with a reason_code and retry_after, and the print-ready page stays the fallback. A read-only token or a viewer is refused FORBIDDEN before anything is made. Free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The invoice's id, from invoice_list or invoice_read. |