Skip to content

Sales broken down by a chosen dimension

GET
/v1/reports/sales
curl --request GET \
--url 'https://api.emite.cr/v1/reports/sales?from=2026-06-01&to=2026-06-30&groupBy=day' \
--header 'Authorization: Bearer <token>'

Grouped by groupBy (day/week/month/currency/paymentMethod/saleCondition/branch/terminal/activity; default month). All groupings filter by currency except currency itself, which returns one row per currency.

from
string
Example
2026-06-01

Inclusive start (CR-local YYYY-MM-DD).

to
string
Example
2026-06-30

Inclusive end (CR-local YYYY-MM-DD).

currency
string

ISO 4217 code. Defaults to the tenant default currency.

convertToCrc
boolean

When true: no currency filter — all documents aggregate in CRC via each document's snapshotted exchange rate. Takes precedence over currency.

groupBy
string
default: month
Allowed values: day week month currency paymentMethod saleCondition branch terminal activity

How to group the documents. day, week (weeks start on Monday) and month bucket them by their Costa Rica emission date; currency gives one row per currency and drops the currency filter; paymentMethod groups by the first payment method (its Hacienda MedioPago code), saleCondition by the CondicionVenta code, branch and terminal by the issuing branch or terminal, and activity by the economic activity code.

Media typeapplication/json
object
groupBy
required

The grouping applied: the one requested, or month by default.

string
Allowed values: day week month currency paymentMethod saleCondition branch terminal activity
currency
required

Currency of the amounts: the filter applied, or CRC with convertToCrc. null when groupBy=currency without convertToCrc — each row is then in its own currency.

string
nullable
rows
required

One row per group with documents: time buckets in time order, every other grouping by grandTotal, largest first.

Array<object>
object
key
required

Group key (date bucket, code, or id depending on groupBy).

string
label
required

Human label when resolvable (branch/terminal name); null otherwise.

string
nullable
count
required

Accepted documents in the group, credit notes not counted.

number
netRevenue
required

Net sales (Σ TotalVentaNeta), credit notes subtracted. Numeric string.

string
totalTax
required

Σ TotalImpuesto, credit notes subtracted. Numeric string.

string
grandTotal
required

Σ TotalComprobante, credit notes subtracted. Numeric string.

string
unconvertedCount

Non-CRC documents excluded from the CRC equivalent for lacking a snapshot exchange rate. Only set with convertToCrc.

number
Example
{
"groupBy": "day"
}