Post an aggregated sales reporting data request for a specific time range

Creates an aggregated sales reporting data request for a specific time range.

Specify the time range with the timeRange path parameter.

Include information on how to aggregate the data for the day time range using the aggregateBy query parameter.

Use the onlyInactiveRestaurants query parameter set to true to get data for inactive restaurants only.

Specify the startBusinessDate and endBusinessDate for the data in the message body.

Identify which restaurants to include or exclude with the restaurantIds and excludedRestaurantIds properties. If left blank, all restaurants are included by default.

Include information about how to aggregate the data with the groupBy property.

Securityoauth2
Request
path Parameters
timeRange
required
string

The specific time range that you are requesting the data for.

Valid values:

  • day - The request covers a one day time range. This value can optionally use the aggregateBy query parameter.

  • week - The request covers a time range of seven days or fewer.

  • month - The request covers a time range of 31 days or fewer.

  • year - The request covers a time range of 366 days or fewer.

Enum: "day" "week" "month" "year"
query Parameters
aggregateBy
string

Aggregates the data by day or hour if using the timeRange value day. The data is aggregated by day by default.

Valid values:

  • DAY - The reporting data is aggregated by day.

  • HOUR - The reporting data is aggregated by hour.

Enum: "DAY" "HOUR"
onlyInactiveRestaurants
boolean

Specifies whether the data is for inactive restaurants only. Active restaurant data is returned by default.

Valid values:

  • true - The data retrieved is for inactive restaurants only.

  • false - The data retrieved is for active restaurants only.

Request Body schema: application/json

A JSON object containing the starting and ending dates for the aggregated sales reporting data request, included or excluded restaurants, and aggregation options.

endBusinessDate
required
number <integer>

The ending date of the time range for the reporting data.

Specify the business day in the format YYYYMMDD. For example, 20220824.

excludedRestaurantIds
required
Array of strings <UUID>

The restaurantGuid values of specific restaurants in the management group to exclude from the reporting data. If used, the data for listed restaurants in the management group that are identified by restaurantGuid is excluded. If left blank, all restaurants are included by default.

groupBy
Array of strings

The way the reporting data results are aggregated. You can use up to two values at a time.

Valid values:

  • DINING_OPTION - The reporting data is grouped by dining option.
  • ORDER_SOURCE - The reporting data is grouped by order source.
  • REVENUE_CENTER - The reporting data is grouped by revenue center.
Items Enum: "REVENUE_CENTER" "DINING_OPTION" "ORDER_SOURCE"
restaurantIds
required
Array of strings <uuid>

The restaurantGuid values of specific restaurants in the management group to include in the reporting data. If used, only the data for listed restaurants in the management group that are identified by restaurantGuid is included. If left blank, all restaurants are included by default.

startBusinessDate
required
number <integer>

The starting date of the time range for the reporting data.

Specify the business day in the format YYYYMMDD. For example, 20220824.

Responses
200

The reportRequestGuid used to retrieve the data.

400

The request contains invalid information.

500

An unexpected internal error occurred. The requestId attached to this error can be referenced by the Toast support team.

post/metrics/{timeRange}
Request samples
application/json
{
  • "startBusinessDate": 0,
  • "endBusinessDate": 0,
  • "restaurantIds": [
    ],
  • "excludedRestaurantIds": [
    ],
  • "groupBy": [
    ]
}
Response samples
application/json
"string"