Docs
Get Resource States
GET /resource-states
GET
/resource-statesRequired Tokens
| Field | Type | Required | Description |
|---|---|---|---|
| Bearer | Authorization: Bearer <api-key> | Optional | Your API key. Pass it as the Bearer token on every request. |
| Event token | x-Event-Token | Optional | Run **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
| Field | Type | Description |
|---|---|---|
| id | Guid | The state's unique ID. |
| name | string | Display name (e.g., "Overtime"). |
| category | string | `Regular`, `Premium`, `Penalty`, or `Violation` — used for billing/reporting grouping. |
| color | string| null | Hex color or token for calendar background rendering. |
| sortOrder | integer | Display order in UI lists and pickers. |
| isActive | bool | When false, the state is deactivated but still referenced by existing thresholds/records. |
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid token. |