Top customers, revenue concentration and new-vs-returning
const url = 'https://api.emite.cr/v1/reports/customers?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/customers?from=2026-06-01&to=2026-06-30&limit=10' \ --header 'Authorization: Bearer <token>'Top-N customers by net grand total, plus top-5/top-10 revenue share and a new-vs-returning split (new = first-ever accepted invoice within the range).
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 customers ranked by grandTotal, largest first. Documents without a saved contact (tickets, receivers typed by hand) share one row with partyId: null.
object
Party id; null for inline/no-receiver documents.
The contact's name as saved today; Consumidor final on the row of documents without a saved contact.
The contact's identification number; null on the row without a contact.
Accepted documents to this customer in the range, credit notes not counted.
Σ TotalComprobante to this customer, credit notes subtracted — the ranking key. Numeric string.
ISO-style timestamp (with offset) of the customer's latest accepted document within the range — not necessarily their latest ever.
Share of the range's revenue held by the largest customers, over every customer and not only the limit returned; the row without a contact counts as one customer.
object
Σ grandTotal over all customers in range. Numeric string.
0..1 share of revenue from the top 5 customers.
0..1 share of revenue from the top 10 customers.
Customers whose first-ever accepted invoice falls within the range.
Customers active in range that had a prior accepted invoice.
Non-CRC documents excluded from the CRC equivalent for lacking a snapshot exchange rate. Only set with convertToCrc.
Examplegenerated
{ "currency": "example", "topCustomers": [ { "partyId": "example", "name": "example", "identification": "example", "count": 1, "grandTotal": "example", "lastPurchase": "example" } ], "concentration": { "totalRevenue": "example", "top5Share": 1, "top10Share": 1 }, "newCustomers": 1, "returningCustomers": 1, "unconvertedCount": 1}