Skip to main content
Every error is application/problem+json (RFC 9457) with agent-first extensions:
Switch on code (stable across releases), show remediation to the user or feed it to an agent, and log request_id. When the failure came from the PAC, the pac object carries the raw PAC/SAT codigo/mensaje. Every problem body also carries a doc_url that deep-links to the matching row below (dots in the code become dashes in the anchor).

Complete error catalog (160 codes)

Every stable code the API can emit, generated by statically scanning the source (a build-time drift guard fails if any code is missing). HTTP is the status the code surfaces with. Anchor = code with dots replaced by dashes, matching the doc_url in every problem body.

PAC / SAT numeric code mapping

Source of truth: src/pac/error-map.ts. Every numeric PAC/SAT code below normalizes to a stable code. Retryable means a transient failure safe to retry with backoff (idempotency guards against duplicate stamps); non-retryable codes require a change before resubmitting.

Timbrado (stamping)

Returned by POST /v1/invoices and POST /v1/invoices/:id/stamp. Code 307 (duplicate) is NOT surfaced as an error — it is resolved as a success-replay of the prior stamp.

Cancellation — invocation/global codes

Global (non per-UUID) codes returned when submitting POST /v1/invoices/:id/cancel.

Cancellation — per-UUID SAT codes

SAT verdicts on the specific CFDI being cancelled (polled asynchronously).

Status query (consultarEstatusComprobante)

Codes from the SAT status query used during cancellation polling and validation enrichment.

CFDI lifecycle status (estatusCfdi)

These are states, not errors. The SAT reports one of these when you query a CFDI; we map it to a normalized cancel_status bucket surfaced on the invoice cancellation object and on POST /v1/validations.

Descarga masiva (massive download)

Codes from the SAT descarga masiva service (POST /v1/downloads). Note the lifetime/size limits — see /guides/massive-download.

Descarga masiva lifecycle (estado)

SAT download-request lifecycle states, mapped to our public download.status.
Regenerate this file with pnpm openapi.