Viewing inactive restaurant data

By default, the analytics data only includes data from restaurants that are considered active at the time and date you make the analytics data request. To view inactive restaurant data, you can include the onlyInactiveRestaurants query parameter in the POST request to the /era/v1/metrics or /era/v1/metrics/{timeRange} endpoints.

The onlyInactiveRestaurants query parameter returns the analytics data for all restaurants in a management group currently considered inactive at the time you send the analytics data request.

For example, if you use the onlyInactiveRestaurants query parameter, a restaurant that is currently active, but was inactive during the requested time range, is not included. A restaurant that is currently inactive, but was active during the requested time range, is included.

Setting onlyInactiveRestaurants to TRUE includes inactive restaurant data and excludes active restaurant data while setting to FALSE excludes inactive restaurant data and includes active restaurant data. The data is treated as if onlyInactiveRestaurants is set to FALSE by default.

The following example curl command sends a POST request to the /era/v1/metrics endpoint using the onlyInactiveRestaurants query parameter.

curl -i -X POST \ 'https://[toast-api-hostname]/era/v1/metrics
?onlyInactiveRestaurants=TRUE' \1
  -H ‘Authorization: Bearer [token]‘ \
  -H 'Content-Type: application/json' \
  -d @[request-info].json \

1

Include the onlyInactiveRestaurants query parameter set to TRUE to request analytics data from inactive restaurants only.

If there are no inactive restaurants in a management group, the response to the POST request for the analytics data is a "No inactive restaurants found" message. For more information about creating a request for aggregated sales reporting data, see Creating a request for aggregated sales reporting data.

If there are inactive restaurants in a management group, but no sales from those restaurants during the requested time range, the response to the GET request for the analytics data is a closing and opening bracket. For more information about retrieving aggregated sales reporting data, see Retrieving the aggregated sales reporting data.