Top products / services by net revenue
const url = 'https://api.emite.cr/v1/reports/products?from=2026-06-01&to=2026-06-30&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/products?from=2026-06-01&to=2026-06-30&limit=10' \ --header 'Authorization: Bearer <token>'Top-N line items (by code + description) ranked by pre-tax net revenue, with quantity sold and line count. Credit-note lines subtract.
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.
How many ranked rows to return. The customer concentration shares are still computed over every customer, not only these.
Responses
Section titled “Responses”object
Currency of the amounts: currency as requested, else the company's default, or CRC with convertToCrc.
Up to limit rows ranked by netRevenue, largest first.
object
The CAByS code of the lines; null for lines without one, such as a REP's payment lines.
The line description as written on the documents. Rows group code and description together, so one product described two ways appears twice.
Σ quantity sold (credit notes subtracted). Numeric string.
Σ line subtotal, pre-tax (credit notes subtracted). Numeric string.
Document lines in the row, credit-note lines included.
Non-CRC documents excluded from the CRC equivalent for lacking a snapshot exchange rate. Only set with convertToCrc.
Examplegenerated
{ "currency": "example", "topProducts": [ { "code": "example", "description": "example", "quantity": "example", "netRevenue": "example", "lineCount": 1 } ], "unconvertedCount": 1}