Sales grouped by receiver province (CR map data)
const url = 'https://api.emite.cr/v1/reports/sales-by-province?from=2026-06-01&to=2026-06-30';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/sales-by-province?from=2026-06-01&to=2026-06-30' \ --header 'Authorization: Bearer <token>'Net grand total and document count per CR provincia (from the receiver party location). Feeds the choropleth map. Documents without a receiver collapse to null.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”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.
Responses
Section titled “Responses”object
Currency of the amounts: currency as requested, else the company's default, or CRC with convertToCrc.
One row per province of the receiver's saved contact, largest grandTotal first.
object
CR provincia code (1-7); null for documents with no receiver location.
Accepted documents in the province, credit notes not counted.
Σ TotalComprobante in the province, credit notes subtracted. Numeric string.
Non-CRC documents excluded from the CRC equivalent for lacking a snapshot exchange rate. Only set with convertToCrc.
Examplegenerated
{ "currency": "example", "rows": [ { "provincia": "example", "count": 1, "grandTotal": "example" } ], "unconvertedCount": 1}