Get Invoice Document
Serves a PDF for one invoice -- the imported archive when one exists, otherwise a fresh render matching v1's own invoice-pdf.ts byte-for-byte (Frederick, 2026-08-03: "the PDFs need to match the PDFs of version one... All the information that's on those PDFs needs to be there.").
Frederick, 2026-07-31: "I don't have the ability to download the invoice PDF that is in v1 and not in v2." Diagnosed as two invoices in one gap: the 178 Invoiced.com-imported documents (migrations/ 0080_invoice_documents.sql) serve fine, but the other 37 -- including every invoice the billing worker has generated since 2026-07-31 -- had no document anywhere, because v1 never stored one either: it rendered fresh via PDFKit (invoice-pdf.ts) on every request. This route ports that behavior instead of only the archive.
IMPORTED ORIGINALS ALWAYS WIN, checked first: those 178 are the actual bytes a customer received (an invoiced.com-branded document, not v1's own template -- confirmed by their own varying per-invoice remittance details, which a single generator reading one company_settings row could never produce). Re-rendering over one would silently replace a real historical document with a document nobody actually sent. Only an invoice with NO archived row falls through to generation -- see app/modules/finance/invoice_pdf.py for the generator itself and its fidelity write-up.
Request
- Base URL: https://api.pigeonly.com (the document declares no server; this is the origin it was published from)
- URL: https://api.pigeonly.com/api/finance/invoices/{invoice_id}/document
- Auth: none declared
Path parameters
Query parameters
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.