Return the invoice as a PDF (rendering it if needed).
Returns the invoice document as a binary <code>application/pdf</code> stream via the internal Klara printing pipeline (<code>luz_web</code> + Aspose Words), mirroring the behaviour of the Klara GUI. The caller must hold the <code>FINANCE</code> permission on the target company.<br/><br/><strong>Reuse vs. render</strong> (mirrors the Klara GUI): if the invoice was already printed, the previously rendered PDF is fetched from storage and returned as-is; if it was not yet printed, it is rendered now and the <code>printedFileId</code> is stored on the invoice record. In both cases the response body is the binary PDF with a <code>Content-Disposition: attachment</code> header containing the suggested filename. This is a <code>POST</code> (not <code>GET</code>) because the first print persists the <code>printedFileId</code>.
Request
- Base URL: https://api.klara.ch
- URL: https://api.klara.ch/core/v1/invoices/{id}/printed-document
- Auth: one of:
- API key in header X-API-KEY
- HTTP bearer
Path parameters
ID of the invoice to return as PDF. Must belong to the company resolved from the bearer JWT.
Response
Invoice PDF returned as a binary <code>application/pdf</code> stream with a <code>Content-Disposition: attachment</code> header — either freshly rendered (first print) or the previously stored PDF (already printed).
Changes
No recorded changes to this operation across all 1 revision of this API.