Docs

Get Resource States

GET /resource-states

GET/resource-states

Required Tokens

FieldTypeRequiredDescription
BearerAuthorization: Bearer <api-key>OptionalYour API key. Pass it as the Bearer token on every request.
Event tokenx-Event-TokenOptionalRun **Get Tokens** in the Authorization folder, or call `GET /Events/{eventId}/authorize` manually.

Returns all resource states defined on the event, ordered by sortOrder. Resource states are the labels applied to resources by the rules engine (Overtime, DoubleTime, MealPenalty, etc.). They are referenced by RuleThreshold.resultingStateId and by ResourceStateRecord.stateId, and — once implemented — by rate cards.

Event scoping: This endpoint does not include {eventId} in the URL. The event is determined automatically from your x-Event-Token.

Example Response

[
  {
    "id": "019700aa-0003-7000-0000-000000000001",
    "name": "Overtime",
    "category": "Premium",
    "color": "#F59E0B",
    "sortOrder": 1,
    "isActive": true
  },
  {
    "id": "019700aa-0003-7000-0000-000000000002",
    "name": "MealPenalty",
    "category": "Penalty",
    "color": "#9333EA",
    "sortOrder": 2,
    "isActive": true
  }
]

Response Fields

FieldTypeDescription
idGuidThe state's unique ID.
namestringDisplay name (e.g., "Overtime").
categorystring`Regular`, `Premium`, `Penalty`, or `Violation` — used for billing/reporting grouping.
colorstring| nullHex color or token for calendar background rendering.
sortOrderintegerDisplay order in UI lists and pickers.
isActiveboolWhen false, the state is deactivated but still referenced by existing thresholds/records.

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid token.