Export the (filtered) proforma list as a spreadsheet
const url = 'https://api.emite.cr/v1/proformas/export?q=PRO-00001&from=2026-01-01&to=2026-12-31&page=1&pageSize=25&format=xlsx';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/proformas/export?q=PRO-00001&from=2026-01-01&to=2026-12-31&page=1&pageSize=25&format=xlsx' \ --header 'Authorization: Bearer <token>'Same filters as GET /v1/proformas — the export runs the identical WHERE and ORDER BY, so the file can never hold a different set than the list. format=xlsx (default) or csv; page/pageSize are ignored. Capped at 25000 rows, with X-Export-Truncated when the cap clips the result. Recorded in the audit log as proforma.exported.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
PRO-00001Free-text search over number and receiver name. With it, results come ordered by number instead of newest first.
Status as of now, including the computed expired (a sent proforma past its validUntil). Repeat the parameter to match several.
Example
2026-01-01Lower bound for createdAt. A bare YYYY-MM-DD is a Costa Rica calendar day (midnight CR = 06:00Z); a full ISO 8601 instant is used verbatim. Inclusive.
Example
2026-12-31Upper bound for createdAt. A bare YYYY-MM-DD covers that whole Costa Rica calendar day (up to, but excluding, midnight CR of the next day). A full ISO 8601 instant is an inclusive cut at that exact instant.
Example
11-indexed page number. Default 1.
Example
25Rows per page. Default 25, max 100.
File format: xlsx (the default) or csv; any other value is a 400.
Responses
Section titled “Responses”The file, named proformas_<YYYY-MM-DD>.xlsx or .csv: an Excel workbook with one sheet, or CSV (UTF-8 with a byte-order mark, comma-separated, CRLF line endings) with the same columns. Column headers are in Spanish; dates and times are Costa Rica time. Read X-Export-Truncated before treating the file as complete.
Headers
Section titled “Headers”attachment; filename="proformas_<YYYY-MM-DD>.<xlsx|csv>", dated with the Costa Rica day of the export.
true when the 25000-row cap cut the set short, false otherwise.
Rows written to the file.