List units and sections
List the units and sections your account can reach, with their ids.
GET https://cotlet.dev/api/v1/quinyx/groups
read
Returns each group with its id, name, type and parent. Type is unit, section or a higher level, and the ids are what the other tools take as group_id. Shifts and absences can be added to units and sections only. The list follows the groups your roles reach in the group selector.
Parameters
| Name | Type | Description |
|---|---|---|
| query string | string | Part of a unit or section name. |
Request
curl https://cotlet.dev/api/v1/quinyx/groups \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("quinyx", "list_groups") const result = await cotlet.call('quinyx', 'list_groups'); cotlet call quinyx list_groups Example response
{
"groups": [
{
"group_id": "1042",
"name": "Harbor Cafe",
"type": "unit",
"parent_id": "1001"
},
{
"group_id": "1043",
"name": "Harbor Cafe Kitchen",
"type": "section",
"parent_id": "1042"
}
]
}