Skip to main content
GET
Get a fiscal totals summary for a filtered set of invoices
Returns fiscal totals (subtotal, IVA, total) and vigente/cancelado counts for invoices matching the given filters. IVA is computed by parsing each matching invoice’s stamped XML — it is never derived as total - subtotal, since that breaks under retenciones or a non-16% rate.

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

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

200 - application/json
subtotal
number
required
Example:

12500.5

total
number
required
Example:

14500.58

iva
object | null
required

Suma de IVA trasladado leído del XML de cada CFDI — null cuando el rango filtrado excede el límite calculable (ver ivaCapped)

Example:

2000.08

ivaCapped
boolean
required

true cuando el rango filtrado tiene demasiados CFDI para calcular IVA en esta solicitud — reduce el rango de fechas

Example:

false

retenciones
object | null
required

Suma de impuestos retenidos (ISR, IVA retenido, etc.) leída del XML de cada CFDI — null cuando el rango filtrado excede el límite calculable (ver ivaCapped)

Example:

350.5

ivaIncomplete
boolean
required

true cuando uno o más CFDI del rango filtrado no pudieron parsearse — iva/retenciones están incompletos (subestimados) para este reporte

Example:

false

vigenteCount
number
required
Example:

48

canceladoCount
number
required
Example:

2

totalCount
number
required
Example:

50