Skip to main content
GET
Get Workforce Absences Unique Values
← Own Workforce API Return the distinct values of one filterable field on absence and accident records, each with a label and the number of rows carrying it.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Query Parameters

string
required
The field to enumerate.Available values: file_idAny other value is rejected with 422. In particular type is not enumerable here — it is free text with a long tail of values, so it is not offered as a filter.Example: field=file_id

Response

string
Echo of the field that was queried
integer
Number of distinct values returned
array[object]

Example

Successful Response

Common Errors

401 Unauthorized

Cause: the key is invalid, or it does not belong to the organization in x-organization-id — the two are looked up as a pair. A request carrying no credentials at all answers AUTH_REQUIRED instead.

403 Forbidden

Cause: the key’s owner is not an enabled member of the organization in x-organization-id.

422 Unprocessable Entity

Cause: field missing, or set to something other than file_id.

List absences paginated

Apply the value as file_id[]

Trainings unique values

The same endpoint for trainings