Skip to content

Utilities

Read an option set

Request

Returns the values a given field accepts, as a flat list of value and text pairs. value is what you send back on a write; text is the label the same thing is shown under in the console. Use this instead of hard-coding IDs, which differ from one account to the next.

The list is not paginated and carries no envelope - the whole set comes back in one array, ordered as the option set defines.

The set named in the URL decides what you get. Common ones are:

Option setValues for
event_typeAn event's type
event_templateThe template an event can be created from
event_shift_statusA shift application's status
event_shift_typeA shift's type
event_shift_status_typeThe category a shift status belongs to
shift_templateThe template a shift can be created from
user_typeA user's type
user_group, user_group_typeA user's group, and the group's type
user_checkpoint, user_checkpoint_typeA user's checkpoint, and its type
training_typeA training module's type
form_type, form_categoryA form's type and category
report_categoryA report's category
blog_article_typeAn article's type
item_categoryAn inventory item's category
headcount_functionalareaA functional area
headcount_functionalarea_typeA functional area's type
headcount_functionalarea_job_titleA job title within a functional area
headcount_location, headcount_location_typeA location and its type
headcount_location_venueA venue within a location
headcount_journeyA journey

Further sets exist beyond this list, and which of them a caller can read depends on the permissions that caller holds.

A few sets are narrowed by a further value - headcount_location_venue by headcount_location_id, for instance, and headcount_functionalarea_job_title by headcount_functional_area_id. Send that value as a query parameter. Where the narrowing value is mandatory and is missing, the response is an empty array rather than an error.

Security
default
Path
modulestringrequired

The option set to read.

Query
associnteger

Send 0 to keep any extra keys an option set carries beyond value and text, such as the group a shift status belongs to. Defaults to 1, which returns value and text only.

activeinteger

Send 1 to limit the list to options that are currently in use. Not every option set distinguishes active options, and those that do not return the full list either way.

filterArray of objects

Narrows the list, in the same form the listing endpoints accept. Only option sets backed by a record type support it; the rest ignore it.

Headers
Rosterfy-Platformstring
curl -i -X GET \
  'https://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/helpers/source/{module}?assoc=0&active=1&filter=%7Bfilter%7D' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Rosterfy-Platform: admin'

Responses

Bodyapplication/json
Array [
valueinteger
textstring
]
Response
[ { "value": 1, "text": "Applied" }, { "value": 2, "text": "Pending" }, { "value": 3, "text": "Confirmed" }, { "value": 4, "text": "Attended" }, { "value": 5, "text": "Emergency" }, { "value": 6, "text": "Rejected" }, { "value": 7, "text": "Waitlist" }, { "value": 8, "text": "Cancelled" }, { "value": 9, "text": "Conflict" }, { "value": 10, "text": "No Show" }, { "value": 11, "text": "Checked In" }, { "value": 12, "text": "Not Approved" }, { "value": 13, "text": "Expired" } ]