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.

Available catalogs

Fiscalapi exposes every bulk download catalog in the /api/v4/download-catalogs resource:

CatalogDescription
SatInvoiceTypesCFDI 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).
SatInvoiceComplementsCFDI complements (complementos, XML extensions the SAT defines for specific operations), such as Payments, Payroll, and Local taxes.
SatInvoiceStatusesCFDI statuses, such as "Vigente" (active) and "Cancelado" (canceled).
SatQueryTypesQuery types, such as Facturas (Invoices) and Metadatos (Metadata).
SatRequestStatusesDownload request statuses at the SAT, such as Aceptada (Accepted) and En proceso (In progress).
SatStatusesSAT response codes for download requests, such as XML mal formado (Malformed XML) and Sello mal formado (Malformed seal).
DownloadTypesDownload types, such as "Emitidos" (issued) and "Recibidos" (received).
DownloadRequestTypesDownload request types: Automatic and Manual.
DownloadRequestStatusesFiscalapi statuses for download requests, such as Esperando SAT (Waiting for SAT) and Esperando API (Waiting for API).
DownloadRuleStatusesFiscalapi 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.


GET/api/v4/download-catalogs

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

GET
/api/v4/download-catalogs
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
}

GET/api/v4/download-catalogs/<catalogName>

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.

StatusWhen it happensMessage
404The catalog name doesn't exist.No existe el catálogo '<catalogName>'.

Request

GET
/v4/download-catalogs/<catalogName>
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
}

Was this page helpful?