getAllIdealEarnedHours

Retrieves ideal and/or earned labor hours in 15-minute intervals for one business date and the requested locations. When requesting many locations or ALL, use getIdealEarnedHoursByPage.

Response notes

  • Locations with no data for the business date are left out of the response. If none of the requested locations has data, the response is HTTP 404 with an empty body.
  • A requested metric with no hours in an interval is returned as 0. A metric that was not requested is not included in the response.
  • By default, an interval is left out when none of the requested metrics has hours. Set includeZeroes=true to return those intervals too.
  • Hours are rounded to 2 decimals per interval, so the sum of the intervals can differ from a daily total in Crunchtime reports by a small amount (typically less than 0.01 hour).
  • The Labor Productivity screen shows ideal hours only for positions with a shift that day, while this API returns every position with ideal hours, so API totals can be higher than that screen.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

Business date to retrieve, in dd-MMM-yy format.

string
required

Comma-separated list of location codes (case-insensitive), at most 100 codes. Duplicates count toward the limit. Use ALL on its own to retrieve every active location in the user's franchise (franchisor users can access every location). If any code is not found, is inactive, or belongs to a location outside the user's franchise, the request fails with HTTP 400 and the message lists all of those codes.

string
required

Comma-separated list of the metrics to return: IDEAL_HOURS, EARNED_HOURS, or both.

boolean
Defaults to false

If true, returns one interval per employee position that has hours in that interval (with includeZeroes=true, positions with 0 hours are included too), with its employeePositionCode. The same startTime then appears once per position, ordered by position code. The totals match the ungrouped response, apart from rounding. If left blank, the default is false (location totals per interval).

string
enum

Interval size. Only 15_MINUTES is supported. If left blank, the default is 15_MINUTES.

Allowed:
boolean
Defaults to false

If true, also returns intervals where all requested metrics are 0. Only intervals stored for the business date are returned; missing intervals are not added, so a location can have fewer than 96 intervals. If left blank, the default is false.

Headers
string
required

API key for the Ideal and Earned Hours API. This is a separate key from the keys of other Crunchtime APIs; a key for another API is rejected.

string
required

Password for the Crunchtime Application User.

string
required

Crunchtime site identifier. (test or production)

string
required

User ID for the Crunchtime Application User.

string

Optional trace identifier for troubleshooting.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
*/*
application/json