Skip to content

Offices & departments

Offices are the top-level organisational units in Dyflexis; departments are nested inside them. Use these endpoints to discover the offices you can write data against and to fetch the full department tree of an office.

Fetch the department tree

Request

Requires scope: business or payroll.

Retrieves all organizational units (offices, department groups, and departments) in a hierarchical tree structure. For a hospitality group, this typically returns each hotel or restaurant as an office, with departments such as Front of House, Kitchen, Housekeeping, and Bar nested underneath.

Security
apiKey(Required scopes: business) or apiKey(Required scopes: payroll)
curl -i -X GET \
  https://beta-developer.dyflexis.com/_mock/openapi/api/department-management/v3/tree \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
Array [
idinteger
Example:1
namestring
typestring

Defines the type of organizational unit

Enum:"office""department_group""department"
Example:"office"
createdstring or null(UTC_DateTimeOrNull)

DateTime in UTC ISO 8601 format

Example:"2026-01-01T00:00:00Z"
modifiedstring or null(UTC_DateTimeOrNull)

DateTime in UTC ISO 8601 format

Example:"2026-01-01T00:00:00Z"
addressIdstring or null
Example:"1"
costCenterIdstring or null
Example:"123"
costCenterNamestring or null
Example:"Harborview Grand Hotel"
activeboolean

Indicates whether the location is currently active

Example:true
departmentGroupsArray of objects

An array representing department groups that belong to a specific location.

departmentsArray of objects(Department)

An array representing departments that belong to a specific location.

]
Response
[ { "id": 1, "name": "string", "type": "office", "created": "2026-01-01T00:00:00Z", "modified": "2026-01-01T00:00:00Z", "addressId": "1", "costCenterId": "123", "costCenterName": "Harborview Grand Hotel", "active": true, "departmentGroups": [], "departments": [] } ]