Download the PDF representación impresa for an invoice
Invoices
Download Invoice PDF
Authenticate with either a Supabase session (member of the invoice’s organization) or an API key with the read:invoices scope belonging to that same organization. Returns the PDF representación impresa of the CFDI (Content-Type: application/pdf), regenerated on-demand from the stamped XML on every call — no PDF is stored server-side.
GET
Download the PDF representación impresa for an invoice
Returns the PDF representación impresa (printed representation) of a stamped CFDI as a downloadable attachment. Like Cancel Invoice, this is a flat route — it does not carry
/organizations/{organizationId}/ in the URL. The invoice’s uuid (its folio fiscal, globally unique across all organizations) is enough to resolve the owning organization server-side, combined with the caller’s own auth context (session or API key).
The PDF is generated on-demand from the stamped CFDI XML on every call —
no PDF is stored or persisted server-side. Each request regenerates it fresh,
so it always reflects the invoice’s current data (e.g.
cancelado status).Authentication
Accepts either:- A Supabase Bearer session (
Authorization: Bearer <token>) — the authenticated user must be a member of the invoice’s organization. - An API key (
X-API-Key: sk_...) with theread:invoicesscope — the key’s own organization must match the invoice’s organization, or the request is rejected with403 Forbidden.
Path Parameters
Example Request
cURL
TypeScript SDK
Example Response
This endpoint does not return a JSON body — it streams the generated PDF file with:Common Errors
401 Unauthorized
Missing or invalid Bearer token / API key.403 Forbidden
The authenticated user is not a member of the invoice’s organization, or the API key does not have theread:invoices scope / belongs to a different organization than the one that owns the invoice.
404 Not Found
uuid does not match any invoice.