v1

latestOpenAPI 3.1.02026-08-06911,228852.2 KB
Financial

Get 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).
get/f/finance/{businessLocationId}/aggregatedSales

Path parameters

businessLocationIdinteger required

The unique identifier for the business location.

Query parameters

datestring date

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.

fromstring date-time

Specify the start datetime for the aggregation range. Must be used together with to. Cannot be combined with date.

tostring date-time

Specify the end datetime for the aggregation range. Must be used together with from. Cannot be combined with date.

flattenedboolean
Example:true
groupBystring required

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

groupByKeystring

The groupBy parameter provided.

groupByValuestring

The value that corresponds to the groupBy parameter.

totalAmountstring

The aggregated total of sales for this data set (ex. staff: manager).

serviceChargestring

The aggregated total of service charges for this data set (ex. staff: manager).

totalDiscountedAmountstring

The aggregated total of discounts for this data set (ex. staff: manager).

totalTaxAmountstring

The aggregated tax total for this data set (ex. staff: manager).

numberOfSalesnumber

The total number of sale lines for this data set (ex. staff: manager).

nextStartOfDayAsIso8601string
dataCompleteboolean
businessNamestring

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
        }
      ]
    }
  ]
}