Skip to main content
GET
Export a filtered set of invoices as CSV
Exports invoices matching the given filters as a CSV file. Each row represents one invoice with columns: Fecha, Serie, Folio, UUID, Tipo, RFC Receptor, Subtotal, IVA, Retenciones, Total, Estatus. IVA and Retenciones are computed the same way as Get Invoice Report Summary — parsed from each invoice’s own stamped XML (IVA filtered to Impuesto="002", never derived by subtraction), so the columns reconcile: Subtotal + IVA - Retenciones = Total.
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.

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

CSV file with the following columns:

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

CSV de facturas