v1
latestOpenAPI 3.1.02026-08-06911,228852.2 KBGet Aggregated Sales
Get sales for the current business day or the specified date range, aggregated by one or more values. The values are specified in the groupBy parameter and are nested in the order provided in the request.
- Use either the date parameter or the from and to parameters to specify the period.
- The date parameter specifies a single date for aggregation.
- The from and to parameters specify a date-time range and must be used together.
- If neither date nor from/to are provided it defaults to today's date.
- The date range between from and to cannot exceed 365 days (1 year).
Path parameters
The unique identifier for the business location.
Query parameters
Specify a single date for which to retrieve aggregated sales data. Cannot be combined with from and to. Use either date, or both from and to.
Specify the start datetime for the aggregation range. Must be used together with to. Cannot be combined with date.
Specify the end datetime for the aggregation range. Must be used together with from. Cannot be combined with date.
Comma-separated list of parameters to group the results by. The allowed values are: staff, device, deviceId, tag, accountingGroup, and statisticGroup. For example, groupBy can be set to staff,device.
Response
Aggregated sales returned
Example response
{
"groupByKey": "staff",
"groupByValue": "manager",
"totalAmount": "47.00",
"serviceCharge": "0.00",
"totalDiscountedAmount": "0.00",
"totalTaxAmount": "7.04",
"numberOfSales": 7,
"children": [
{
"groupByKey": "device",
"children": [
{
"groupByValue": "iPad7",
"totalAmount": "28.00",
"serviceCharge": "0.00",
"totalDiscountedAmount": "0.00",
"totalTaxAmount": "4.19",
"numberOfSales": 3
}
]
}
]
}