Bulk download catalogs
The SAT (Mexico's tax authority, Servicio de Administración Tributaria) defines a set of standard catalogs for the bulk download (the SAT service that delivers the CFDIs a taxpayer issued and received) of CFDIs (Mexico's electronic invoices) and metadata in Mexico. These catalogs contain the codes and descriptions that bulk download requires.
See the introduction to bulk download for its concepts.
Available catalogs
Fiscalapi exposes every bulk download catalog in the /api/v4/download-catalogs resource:
| Catalog | Description |
|---|---|
| SatInvoiceTypes | CFDI types, such as income (I, the regular sales invoice), credit note (an Egreso CFDI, type E), and payroll (N, the CFDI issued for each salary payment). |
| SatInvoiceComplements | CFDI complements (complementos, XML extensions the SAT defines for specific operations), such as Payments, Payroll, and Local taxes. |
| SatInvoiceStatuses | CFDI statuses, such as "Vigente" (active) and "Cancelado" (canceled). |
| SatQueryTypes | Query types, such as Facturas (Invoices) and Metadatos (Metadata). |
| SatRequestStatuses | Download request statuses at the SAT, such as Aceptada (Accepted) and En proceso (In progress). |
| SatStatuses | SAT response codes for download requests, such as XML mal formado (Malformed XML) and Sello mal formado (Malformed seal). |
| DownloadTypes | Download types, such as "Emitidos" (issued) and "Recibidos" (received). |
| DownloadRequestTypes | Download request types: Automatic and Manual. |
| DownloadRequestStatuses | Fiscalapi statuses for download requests, such as Esperando SAT (Waiting for SAT) and Esperando API (Waiting for API). |
| DownloadRuleStatuses | Fiscalapi statuses for download rules, such as Pendiente (Pending), Aprobada (Approved), and Rechazada (Rejected). |
CatalogDto model
The CatalogDto model represents one catalog record and is Fiscalapi's standard model for the records of every catalog. This resource's responses are CatalogDto objects.
Properties
- Name
id- Type
- string?
- Description
The record's unique code in the catalog.
- Name
description- Type
- string?
- Description
The record's description in the catalog.
List catalogs
This endpoint returns the names of the available catalogs, without pagination. Use each name to list that catalog's records with List catalog records.
Request
curl --location 'https://test.fiscalapi.com/api/v4/download-catalogs' \
--header 'X-TENANT-KEY: <tenant-key>' \
--header 'X-TIME-ZONE: America/Mexico_City' \
--header 'X-API-KEY: <api-key>' \
--data ''
Response
{
"data": [
"SatInvoiceTypes",
"SatInvoiceComplements",
"SatInvoiceStatuses",
"SatQueryTypes",
"SatRequestStatuses",
"SatStatuses",
"DownloadTypes",
"DownloadRequestTypes",
"DownloadRequestStatuses",
"DownloadRuleStatuses"
],
"succeeded": true,
"message": "",
"details": "",
"httpStatusCode": 200
}
List catalog records
This endpoint lists the records of a catalog, whose name it receives in the path. The name is case-sensitive, and the valid names are the ones that List catalogs returns.
Errors
The message arrives in details.
| Status | When it happens | Message |
|---|---|---|
| 404 | The catalog name doesn't exist. | No existe el catálogo '<catalogName>'. |
Request
curl --location 'https://test.fiscalapi.com/api/v4/download-catalogs/SatInvoiceTypes' \
--header 'X-TENANT-KEY: <tenant-key>' \
--header 'X-TIME-ZONE: America/Mexico_City' \
--header 'X-API-KEY: <api-key>' \
--data ''
Response
{
"data": [
{
"description": "Todos",
"id": "",
"createdAt": "2024-08-10T15:46:30.373",
"updatedAt": null
},
{
"description": "Egreso",
"id": "E",
"createdAt": "2024-08-10T15:46:30.373",
"updatedAt": null
},
{
"description": "Ingreso",
"id": "I",
"createdAt": "2024-08-10T15:46:30.373",
"updatedAt": null
},
{
"description": "Nomina",
"id": "N",
"createdAt": "2024-08-10T15:46:30.373",
"updatedAt": null
},
{
"description": "Pago",
"id": "P",
"createdAt": "2024-08-10T15:46:30.373",
"updatedAt": null
},
{
"description": "Traslado",
"id": "T",
"createdAt": "2024-08-10T15:46:30.373",
"updatedAt": null
}
],
"succeeded": true,
"message": "",
"details": "",
"httpStatusCode": 200
}