Skip to main content
GET
Get Workforce Unique Values
← Own Workforce API Return the distinct values of one filterable field, each with a human-readable label and the number of employee rows carrying it. This is what populates the file filter on List Workforce Employees without paging the whole list first.

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_idToday file_id is the only accepted value; any other is rejected with 422. The parameter exists so the contract can grow without a new endpoint.Example: field=file_id

Response

string
Echo of the field that was queried
integer
Number of distinct values returned
array[object]
To filter the list for the null bucket, pass the nil UUID 00000000-0000-0000-0000-000000000000 as file_id[], not an empty value.

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 employees

Apply the value as file_id[]

Trainings unique values

The same endpoint for trainings