Skip to main content
GET
Export a filtered set of invoices as a ZIP of their PDF representation
Exports invoices matching the given filters as a ZIP file containing one PDF file per invoice, named by UUID.
Note: The export is limited to 500 invoices per request. If the filter matches more than 500 invoices, the endpoint returns a 400 error. To export larger datasets, use multiple requests with narrower date ranges or other filters.
Performance: PDF generation for many invoices can be slower than CSV or XML exports. For large batches, consider exporting in smaller chunks or using the XML export if PDF formatting is not strictly required.

Authentication

Accepts either:
  • A Supabase Bearer session (Authorization: Bearer <token>) with the X-Organization-Id: <org-id> header.
  • An API key (X-API-Key: sk_...) with the read:invoices scope.

Query Parameters

Example Request

cURL
TypeScript SDK

Example Response

ZIP file containing PDF files:
Each PDF file is a formatted invoice document ready for printing or archival.

Common Errors

400 Bad Request

The filter matches more than 500 invoices. Use narrower date ranges or additional filters to reduce the result set.

401 Unauthorized

Missing or invalid Bearer token / API key.

403 Forbidden

The authenticated user is not a member of the organization sent in X-Organization-Id, or the API key does not have the read:invoices scope.

Authorizations

X-API-Key
string
header
required

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

Headers

X-Organization-Id
string

Required for Supabase session auth. Ignored when authenticating with an API key (the organization resolves from the key).

Query Parameters

dateFrom
string

Filtra por fecha de registro en Timbrix (createdAt), desde (inclusive, ISO 8601). Un valor de solo fecha (YYYY-MM-DD) se ancla al inicio del día en America/Mexico_City.

Example:

"2026-08-01"

dateTo
string

Filtra por fecha de registro en Timbrix (createdAt), hasta (inclusive, ISO 8601). Un valor de solo fecha (YYYY-MM-DD) se ancla al final del día (23:59:59.999) en America/Mexico_City, incluyendo el día completo.

Example:

"2026-08-31"

type
enum<string>

Filtra por tipo de comprobante

Available options:
I,
E,
T
status
enum<string>

Filtra por estatus

Available options:
vigente,
cancelado
rfcReceptor
string

Filtra por RFC exacto del receptor

Example:

"XAXX010101000"

environment
enum<string>

Filtra por entorno. Ignorado para peticiones autenticadas con API key (siempre se usa el entorno de la key). Para una sesión de Supabase, por defecto es 'production' — pasa este parámetro para incluir CFDI de sandbox.

Available options:
sandbox,
production

Response

ZIP con los PDF