Skip to content

Export the (filtered) proforma list as a spreadsheet

GET
/v1/proformas/export
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.

q
string
Example
PRO-00001

Free-text search over number and receiver name. With it, results come ordered by number instead of newest first.

status
Array<string>
Allowed values: draft sent accepted rejected converted cancelled expired

Status as of now, including the computed expired (a sent proforma past its validUntil). Repeat the parameter to match several.

from
string
Example
2026-01-01

Lower 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.

to
string
Example
2026-12-31

Upper 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.

page
number
Example
1

1-indexed page number. Default 1.

pageSize
number
Example
25

Rows per page. Default 25, max 100.

format
string
Allowed values: xlsx csv

File format: xlsx (the default) or csv; any other value is a 400.

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.

string format: binary
Content-Disposition
string

attachment; filename="proformas_<YYYY-MM-DD>.<xlsx|csv>", dated with the Costa Rica day of the export.

X-Export-Truncated
string
Allowed values: true false

true when the 25000-row cap cut the set short, false otherwise.

X-Export-Row-Count
integer

Rows written to the file.