Org units of the tenant (tenant:access)
GET /api/hr/v1/org-units
Module: HR · operationId: listOrgUnits · Tag: Organisation · Auth: access token (Authorization: Bearer <accessToken>)
Responses
- 200 Units ordered by position and name (
application/json)
Fields of the 200 answer:
items(array of OrgUnit, required): Org units of the tenantname(string, required): Name of the unit (max length 120)archived(boolean): Archived: no longer offered for new data, kept for existing datadeputyId(string): Stands in for the head (decides while the head is away)headId(string): Employee who leads the unit (direct manager of its members)id(string, read-only): Id of the org unitmemberCount(integer, read-only): Active employees placed directly in the unitparentId(string): Empty = top levelsortOrder(integer): Position in lists (ascending)version(integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)
Example 200 answer:
{
"items": [
{
"archived": false,
"headId": "5c7e9a1c-3e5a-4c7e-9a1c-5e7a9c1e3a5b",
"id": "7c9e1a3c-5e7a-4c9e-8a3c-5e7a9c1e3a74",
"memberCount": 2,
"name": "Geschäftsführung",
"sortOrder": 0,
"version": 1
},
{
"archived": false,
"deputyId": "f2a4c6e8-0b2d-4f4a-8c6e-8a0c2e4b6d1c",
"headId": "9b1d3f5a-7c9e-4b1d-8f3a-5c7e9b1d3f2e",
"id": "2e4a6c8e-0a2c-4e4a-8c6e-0a2c4e6a8c72",
"memberCount": 3,
"name": "Technik",
"parentId": "7c9e1a3c-5e7a-4c9e-8a3c-5e7a9c1e3a74",
"sortOrder": 20,
"version": 1
},
{
"archived": false,
"deputyId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
"headId": "b2d4f6a8-0c1e-4a3b-9d5f-7e9a1c3b5d04",
"id": "0c2e4a6c-8e0a-4c2e-9a4c-6e8a0c2e4a71",
"memberCount": 4,
"name": "Service Desk",
"parentId": "2e4a6c8e-0a2c-4e4a-8c6e-0a2c4e6a8c72",
"sortOrder": 10,
"version": 2
}
]
}
Example request
curl -X GET 'https://api.mbcom.cloud/api/hr/v1/org-units' \
-H "Authorization: Bearer $ACCESS_TOKEN"