Overview
Quetzal Invoicing is a single REST API for emitting fiscal documents — invoices, credit notes, debit notes, payment complements, and cancellations — against Latin American tax authorities. It abstracts away the per-country differences (DIAN in Colombia, SAT in Mexico, SRI in Ecuador, SUNAT in Peru) behind one resource shape: the Document.
POST /v1/documents
You send Quetzal a document with an issuer, a receiver, some line_items, and a country. Quetzal handles the rest: building the country-specific payload (CFDI, UBL, XML), authenticating against the tax authority, retrying transient failures, and surfacing the final fiscal ID back to you.
What's in the API
Six resources cover the full surface:
| Resource | Endpoint | Role |
|---|---|---|
| Documents | /v1/documents | Fiscal documents — the primary resource. Has a state machine (DRAFT → PENDING_SUBMISSION → EMITTED, plus FAILED / CANCELLED branches). |
| Parties | /v1/parties | Issuers and receivers — anybody who appears as a tax counterparty. Reusable across documents. |
| Issuer Profiles | /v1/issuer_profiles | A tenant's fiscal identity per country (certificate, numerator range, regulatory metadata). |
| Webhook Subscriptions | /v1/webhook_subscriptions | Endpoints Quetzal calls when a document changes state. |
| FacturaGreen Webhooks | /v1/webhooks/factura_green | Inbound endpoint for the MX provider — internal, not for direct caller use. |
| Health | /v1/health | Liveness probe. |
What it covers today
| Country | Authority | Document types validated in production |
|---|---|---|
| 🇨🇴 Colombia | DIAN | Invoice, credit note, debit note, cancellation |
| 🇲🇽 Mexico | SAT | Invoice, payment complement (CFDI), cancellation |
| 🇪🇨 Ecuador | SRI | Invoice, credit note |
| 🇵🇪 Peru | SUNAT | Invoice |
Per-country requirements (folios, certificates, address codes) live in the country_specific field on every request. See Country specifics in the API Reference for the per-country shape.
Where to go next
- Building an integration? Start with the Quickstart — a real
POST /v1/documentsend-to-end in five minutes. - Looking up an endpoint or field? Open the API Reference — OpenAPI 3.1 rendered inline.
- Reviewing the design? Read the Principles and the System Design Document.
- Stuck on a term? Check the Glossary.
What Quetzal does NOT do
To set expectations:
- It is not an accounting system. Quetzal records emitted documents; ledger, reconciliation, and reporting live elsewhere.
- It is not a payment gateway. Payment complements record that a payment happened — Quetzal does not collect, route, or settle funds.
- It is not a billing engine for end customers. Quetzal accepts ready-to-emit documents; the caller decides when and what to invoice.
In short: you compute the line items, Quetzal makes them legally fiscal.