Skip to main content
GET
/
departments
List all departments
curl --request GET \
  --url https://{base_url}/api/v1/departments \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "2784_118",
    "costCentreCode": "",
    "manager": "",
    "name": "Bakery",
    "payRollCode": "",
    "roles": [
      {
        "id": "2213_6820",
        "costCentreCode": "",
        "defaultActivity": "2760_183",
        "name": "Assistant Manager"
      },
      {
        "id": "2213_6559",
        "costCentreCode": "",
        "defaultActivity": "2760_183",
        "name": "Retail Assistant"
      }
    ],
    "workDayFinishTime": "",
    "workDayStartTime": ""
  },
  {
    "id": "2784_121",
    "costCentreCode": "",
    "manager": "",
    "name": "Storeroom",
    "payRollCode": "",
    "roles": [],
    "workDayFinishTime": "",
    "workDayStartTime": ""
  }
]

Authorizations

Authorization
string
header
required

Access token obtained from /oauth/token. Pass as Authorization: Bearer {token}

Response

A list of departments

id
string

The unique identifier for the department

Example:

"2784_118"

costCentreCode
string

The cost centre code associated with this department. Empty string if not assigned.

Example:

""

manager
string

The manager of the department. Empty string if not assigned.

Example:

""

name
string

The display name of the department

Example:

"Bakery"

payRollCode
string

The payroll code associated with this department. Empty string if not assigned.

Example:

""

roles
object[]

A list of roles within this department

workDayFinishTime
string

The default work day finish time for this department. Empty string if not set.

Example:

""

workDayStartTime
string

The default work day start time for this department. Empty string if not set.

Example:

""