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
curl https://cotlet.dev/api/v1/shiftbase/departments \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("shiftbase", "list_departments")
Node.js
const result = await cotlet.call('shiftbase', 'list_departments');
CLI
cotlet call shiftbase list_departments

Example response

JSON

{
  "departments": [
    {
      "id": "12",
      "name": "Harbor Cafe",
      "teams": [
        {
          "id": "31",
          "name": "Kitchen"
        },
        {
          "id": "32",
          "name": "Floor"
        }
      ]
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.