Sales Analytics

Prev Next
Get
/public/v1/labor/sales-analytics

Retrieves published forecast sales Maximum date range is 14 days; a wider range returns 400. Note: despite the name, most interval fields are labor metrics and the whole jobDetails array is per-job labor.

Security

The requesting user must have the following permission to retrieve sales analytics:

  • Sales & Cash → Forecasts → Weekly Forecasting → View Weekly Forecasting
Security
HTTP
Type Bearer
Header parameters
x-r365-context-tenant-id
stringRequired

Identifies the R365 tenant the request applies to. Required on every request.

Query parameters
locationId
string (uuid) Required

Identifier of the location to get forecast data

startDate
string (date) Required

Start date to get forecast data

endDate
string (date) Required

End date to get forecast data

Responses
200

Published forecast sales

Expand All
object
locationId
string (uuid)

Unique identifier of the location.

locationName
string | null

Display name of the location.

dailyData
Array of object | null

Forecast data grouped by date for the requested period.

object
date
string (date-time)

Forecast date.

intervals
Array of object | null

Forecast intervals within the date.

object
startDateTime
string (date-time)

Start date and time of the interval.

publishedAt
string (date-time) | null

Date and time the forecast was published. Null when the forecast has not been published yet.

publishedByName
string | null

Username of the user who published the forecast.

forecastedNetSales
number (double)

Forecasted net sales amount for the interval (precision 10,2).

forecastedGrossSales
number (double)

Forecasted gross sales amount for the interval (precision 10,2).

forecastedEntree
number (double)

Forecasted entree count for the interval (precision 10,2).

forecastedLabor
number (double)

Forecasted labor cost for the interval (precision 5,2).

actualNetSales
number (double)

Actual net sales amount recorded for the interval (precision 5,2).

actualGrossSales
number (double)

Actual gross sales amount recorded for the interval (precision 5,2).

actualEntreeCount
integer (int32)

Actual entree count recorded for the interval.

actualLabor
number (double)

Actual labor cost recorded for the interval (precision 5,2).

actualLaborOTHours
number (double)

Actual overtime hours recorded for the interval (precision 5,2).

actualLaborDollars
number (double)

Actual labor dollars recorded for the interval (precision 5,2).

optimalLaborVariance
number (double)

Difference between optimal and actual labor (OptimalLabor - ActualLabor, precision 5,2).

optimalLabor
number (double)

Optimal labor cost for the interval (precision 5,2).

jobDetails
Array of object | null

Per-job breakdown of forecasted and actual labor within the interval.

object
jobId
string (uuid)

Job identifier.

jobName
string | null

Job name.

laborForecast
number (double)

Forecasted labor cost for the job within the interval (precision 5,2).

actualLabor
number (double)

Actual labor cost recorded for the job within the interval (precision 5,2).

actualLaborOTHours
number (double)

Actual overtime hours recorded for the job within the interval (precision 5,2).

actualLaborDollars
number (double)

Actual labor dollars recorded for the job within the interval (precision 5,2).

Expand All
object
locationId
string (uuid)

Unique identifier of the location.

locationName
string | null

Display name of the location.

dailyData
Array of object | null

Forecast data grouped by date for the requested period.

object
date
string (date-time)

Forecast date.

intervals
Array of object | null

Forecast intervals within the date.

object
startDateTime
string (date-time)

Start date and time of the interval.

publishedAt
string (date-time) | null

Date and time the forecast was published. Null when the forecast has not been published yet.

publishedByName
string | null

Username of the user who published the forecast.

forecastedNetSales
number (double)

Forecasted net sales amount for the interval (precision 10,2).

forecastedGrossSales
number (double)

Forecasted gross sales amount for the interval (precision 10,2).

forecastedEntree
number (double)

Forecasted entree count for the interval (precision 10,2).

forecastedLabor
number (double)

Forecasted labor cost for the interval (precision 5,2).

actualNetSales
number (double)

Actual net sales amount recorded for the interval (precision 5,2).

actualGrossSales
number (double)

Actual gross sales amount recorded for the interval (precision 5,2).

actualEntreeCount
integer (int32)

Actual entree count recorded for the interval.

actualLabor
number (double)

Actual labor cost recorded for the interval (precision 5,2).

actualLaborOTHours
number (double)

Actual overtime hours recorded for the interval (precision 5,2).

actualLaborDollars
number (double)

Actual labor dollars recorded for the interval (precision 5,2).

optimalLaborVariance
number (double)

Difference between optimal and actual labor (OptimalLabor - ActualLabor, precision 5,2).

optimalLabor
number (double)

Optimal labor cost for the interval (precision 5,2).

jobDetails
Array of object | null

Per-job breakdown of forecasted and actual labor within the interval.

object
jobId
string (uuid)

Job identifier.

jobName
string | null

Job name.

laborForecast
number (double)

Forecasted labor cost for the job within the interval (precision 5,2).

actualLabor
number (double)

Actual labor cost recorded for the job within the interval (precision 5,2).

actualLaborOTHours
number (double)

Actual overtime hours recorded for the job within the interval (precision 5,2).

actualLaborDollars
number (double)

Actual labor dollars recorded for the job within the interval (precision 5,2).

Expand All
object
locationId
string (uuid)

Unique identifier of the location.

locationName
string | null

Display name of the location.

dailyData
Array of object | null

Forecast data grouped by date for the requested period.

object
date
string (date-time)

Forecast date.

intervals
Array of object | null

Forecast intervals within the date.

object
startDateTime
string (date-time)

Start date and time of the interval.

publishedAt
string (date-time) | null

Date and time the forecast was published. Null when the forecast has not been published yet.

publishedByName
string | null

Username of the user who published the forecast.

forecastedNetSales
number (double)

Forecasted net sales amount for the interval (precision 10,2).

forecastedGrossSales
number (double)

Forecasted gross sales amount for the interval (precision 10,2).

forecastedEntree
number (double)

Forecasted entree count for the interval (precision 10,2).

forecastedLabor
number (double)

Forecasted labor cost for the interval (precision 5,2).

actualNetSales
number (double)

Actual net sales amount recorded for the interval (precision 5,2).

actualGrossSales
number (double)

Actual gross sales amount recorded for the interval (precision 5,2).

actualEntreeCount
integer (int32)

Actual entree count recorded for the interval.

actualLabor
number (double)

Actual labor cost recorded for the interval (precision 5,2).

actualLaborOTHours
number (double)

Actual overtime hours recorded for the interval (precision 5,2).

actualLaborDollars
number (double)

Actual labor dollars recorded for the interval (precision 5,2).

optimalLaborVariance
number (double)

Difference between optimal and actual labor (OptimalLabor - ActualLabor, precision 5,2).

optimalLabor
number (double)

Optimal labor cost for the interval (precision 5,2).

jobDetails
Array of object | null

Per-job breakdown of forecasted and actual labor within the interval.

object
jobId
string (uuid)

Job identifier.

jobName
string | null

Job name.

laborForecast
number (double)

Forecasted labor cost for the job within the interval (precision 5,2).

actualLabor
number (double)

Actual labor cost recorded for the job within the interval (precision 5,2).

actualLaborOTHours
number (double)

Actual overtime hours recorded for the job within the interval (precision 5,2).

actualLaborDollars
number (double)

Actual labor dollars recorded for the job within the interval (precision 5,2).

400

Bad Request — a parameter value is malformed, of the wrong type, or outside its allowed range.

401

Unauthorized — the bearer token is missing, invalid or expired, or is not valid for the specified tenant.

403

Forbidden — the caller lacks the permission required for this operation.

404

Not Found — the requested resource does not exist, or the supplied continuation token is unknown or has expired.

409

Conflict — the request conflicts with the current state of the resource and cannot be applied.

422

Unprocessable Entity — a required parameter is missing, or a supplied parameter value is invalid.

429

Too Many Requests — the caller has exceeded the rate limit; retry after a short delay.

500

Internal Server Error — an unexpected error occurred while processing the request.