Export a report to CSV or XLSX
const url = 'https://api.emite.cr/v1/reports/overview/export?from=2026-06-01&to=2026-06-30&groupBy=day&format=csv&limit=10';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.emite.cr/v1/reports/overview/export?from=2026-06-01&to=2026-06-30&groupBy=day&format=csv&limit=10' \ --header 'Authorization: Bearer <token>'Serializes one of overview/sales/customers/products/tax-summary/compliance/sales-by-province with the same filters as its view endpoint. format=csv (default) returns the primary table; format=xlsx returns a styled multi-sheet workbook. Every export is recorded in the audit log as report.exported.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The report to export; it takes the query parameters of its view endpoint (GET /v1/reports/{report}).
Query Parameters
Section titled “Query Parameters”Example
2026-06-01Inclusive start (CR-local YYYY-MM-DD).
Example
2026-06-30Inclusive end (CR-local YYYY-MM-DD).
ISO 4217 code. Defaults to the tenant default currency.
When true: no currency filter — all documents aggregate in CRC via each document's snapshotted exchange rate. Takes precedence over currency.
How to group the documents. day, week (weeks start on Monday) and month bucket them by their Costa Rica emission date; currency gives one row per currency and drops the currency filter; paymentMethod groups by the first payment method (its Hacienda MedioPago code), saleCondition by the CondicionVenta code, branch and terminal by the issuing branch or terminal, and activity by the economic activity code.
csv returns the report's primary table only, as UTF-8 text; xlsx returns a workbook with every table of the report, one sheet each. The file is named <report>-<from>_<to>.<format>; with convertToCrc every money column header ends in (CRC).
Row cap for the ranked reports (customers, products); the other reports ignore it. Without it an export carries the same 10 rows the report shows; up to 5000.
Responses
Section titled “Responses”The file, named <report>-<from>_<to>.csv or .xlsx after the Costa Rica calendar days of the resolved range. CSV: the report's primary table only, UTF-8 with a byte-order mark, comma-separated, CRLF line endings. XLSX: one sheet per table of the report. Column headers are in Spanish; with convertToCrc every money column header ends in (CRC).
Headers
Section titled “Headers”attachment; filename="<report>-<from>_<to>.<csv|xlsx>".
REPORT_NOT_EXPORTABLE: report is not one of the exportable reports.