List departments
List the departments and teams of the account.
GET https://cotlet.dev/api/v1/shiftbase/departments
read
Returns each department with its id and the teams in it. Use the ids to filter the other tools. An account sees only the departments its role can open.
Parameters
No parameters.
Request
curl https://cotlet.dev/api/v1/shiftbase/departments \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("shiftbase", "list_departments") const result = await cotlet.call('shiftbase', 'list_departments'); cotlet call shiftbase list_departments Example response
{
"departments": [
{
"id": "12",
"name": "Harbor Cafe",
"teams": [
{
"id": "31",
"name": "Kitchen"
},
{
"id": "32",
"name": "Floor"
}
]
}
]
}