Skip to content

FISCALISTO / API / REFERENCE

Request an issuer's invoices from SAT · SAT downloads

Open in ChatGPTOpen in ClaudeOpen in Cursor
POST
/v1/sat_downloads

SAT's bulk download: the invoices the issuer received (or issued) in a period of up to a year, with their XML. It answers 202 right away; SAT takes from minutes to hours and when it finishes sat_download.completed (or sat_download.failed) arrives and the invoices are in GET /v1/sat_invoices. In production it needs the issuer's stored e.firma; in test mode SAT isn't asked: the download brings sample invoices instantly. In production it uses 1 stamp for every 100 CFDIs it brings (at least 1).

Before you call

  • The issuer's stored e.firma (in production; not needed in test mode): POST /v1/issuers/{id}/efirma with keep_for_downloads: true. An RFC of your empresa uses the one stored in the app.

Authorization

bearerAuth
headerAuthorizationBearer <key>

Your secret key: fk_test_… in test mode, fk_live_… in production. Desarrolladores › Llaves.

Headers

Idempotency-Key?string

Optional (the SDKs send it on their own). If the response is lost, repeat the request with the same value within 24 hours: it answers the same, with idempotent-replayed: true, and doesn't do it twice (it doesn't create, send emails or charge).

Length1 <= length <= 255

Request body

application/json
  1. body
issuer?string

The issuer (iss_…). By default, your only issuer.

direction?string

received (the invoices issued to the issuer, the default) or issued (those it issued, even if not with Fiscalisto).

Default"received"
One of"received""issued"
from*string

From what day (inclusive), in Mexico City time.

Pattern^\d{4}-\d{2}-\d{2}$
to*string

Until what day (inclusive). At most a year after from, and not after today.

Pattern^\d{4}-\d{2}-\d{2}$
type?string

Only one CFDI type: I, E, P, T or N. By default, all of them.

One of"I""E""P""T""N"
counterparty_tax_id?string

Only those of one RFC: the issuer of the received ones, or the recipient of the issued ones.

Pattern^[A-ZÑ&]{3,4}\d{6}[A-Z0-9]{3}$
uuid?string

A single invoice, by its folio fiscal (UUID).

Pattern^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response body

OK.

application/json
  1. response

A request to the SAT for an issuer's issued or received invoices in a period.

id*string

Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

object*string

What kind of object it is («invoice», «customer»…).

issuer*string

The issuer whose invoices are requested.

direction*string

received (the ones made to them) or issued (the ones they issued).

One of"received""issued"
from*|

From which day (inclusive).

to*|

Up to which day (inclusive).

type*|

The receipt type requested, or null for all.

counterparty_tax_id*|

The counterparty RFC requested, or null.

uuid*|

The tax folio requested, or null.

status*string

processing (the SAT is preparing it: minutes to hours), completed (the invoices are now in GET /v1/sat_invoices) or failed (the reason in error).

One of"processing""completed""failed"
new_invoices*|

How many new invoices it brought (the ones it already had don't count). null until it finishes.

error*|

Why it failed, as the SAT said. null if it didn't fail.

created_at*|

When it was requested.

completed_at*|

When it finished, or null.

Errors

  • The e.firma can't be used: it isn't an e.firma (it's a CSD), it belongs to another RFC, it expired or the password doesn't open it.

  • To download an issuer's invoices from the SAT in live mode, keep its e.firma first: POST /v1/issuers/{id}/efirma with keep_for_downloads: true (also when the kept one expired).

  • The issuer is archived and no longer stamps. Its documents can still be read and canceled.

  • The account has several issuers and the request doesn't say which: send issuer (iss_…).

  • The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.

  • The SAT rejected the download request. message_es has its reason (for example, the same period and filters were requested too many times).

  • The account has no live stamps left: to stamp, check RFCs against SAT's lists, look up constancias, request SAT downloads or fetch declarations, the compliance opinion or the mailbox from SAT. Buy a pack in Desarrolladores › Timbres y pagos, or turn on auto-recharge. Never happens in test mode.

  • Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.

  • That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.

  • This key can't use that issuer.

  • There is no such issuer in the account (or it belongs to the other mode).

  • You reached today's limit of something not paid with stamps. Retry-After says how many seconds until midnight in Mexico City.

Plus those of any call (key, fields, limits): Errors. They all carry code, message and, when it's about a field, param.

curl -X POST 'https://api.fiscalisto.com/v1/sat_downloads' \  -H 'Authorization: Bearer fk_test_…' \  -H 'Idempotency-Key: pedido-A-1042' \  -H 'Content-Type: application/json' \  -d '{  "direction": "received",  "from": "2026-09-01",  "to": "2026-09-30"}'
{  "id": "sdl_OufpKqnrvx9p3n8vQd2LkW7mZr1XyT5uBc",  "object": "sat_download",  "livemode": false,  "issuer": "iss_OufpKqnrvx9p",  "direction": "received",  "from": "2026-09-01",  "to": "2026-09-30",  "type": null,  "counterparty_tax_id": null,  "uuid": null,  "status": "processing",  "new_invoices": null,  "error": null,  "created_at": "2026-10-24T10:20:00-06:00",  "completed_at": null}

Was this page helpful?