Skip to main content
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 the read:invoices scope — the key’s own organization must match the invoice’s organization, or the request is rejected with 403 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 the read:invoices scope / belongs to a different organization than the one that owns the invoice.

404 Not Found

uuid does not match any invoice.

Authorizations

X-API-Key
string
header
required

API Key for authentication (format: sk_...)

Path Parameters

uuid
string
required

Folio fiscal UUID of the invoice

Response

The generated PDF representación impresa

The response is of type file.