An export returns its content as a file attachment, not inside the usual JSON envelope. The response carries its own Content-Type and a Content-Disposition header with the suggested filename:
Content-Type: text/csv; charset=utf-8
Content-Disposition: attachment; filename="<slug>_validaciones_2026-08-31.csv"An error during an export does return to the normal format: the body is an error document with Content-Type: application/json. The practical distinction is that the content type indicates success before the body is read.
The format set is not universal
There is no single set of formats. Each export family accepts its own, and the format parameter takes only those of its operation:
| family | accepted formats |
|---|---|
| Billing | csv, xlsx |
| Finance | csv, xlsx, pdf, html depending on the operation |
| Validations | xml, pdf |
| Import preview | csv, xlsx, pdf, preview |
A value outside the operation's set is rejected with 422; there is no implicit conversion and no shared default. The reference page of each export declares its own.
Choosing a format
| format | when it fits |
|---|---|
csv | Programmatic ingestion and large volumes. The lightest option |
xlsx | Spreadsheet consumption, with types and formatting preserved |
pdf | A document to archive or present, not to process |
html | Browser preview |
xml | Exchange with systems that require it, such as Banxico's CEP |
Caps
Exports in pdf limit the number of rows in the document — 1,000 on account statements — because generation happens in memory. Past that cut the document is delivered truncated and says so; larger volumes call for csv or xlsx.
Input formats
Imports accept a different and wider set, because it covers the files a user may already have: besides csv, xlsx, xls, txt and json, validation imports accept images (png, jpg, webp) and compressed archives holding batches of receipts.
The difference between the two sets is deliberate: an export produces structured data, whereas an import must accept whatever exists on the other side.