v1

latestOpenAPI 3.1.0Apache 2.02026-07-22160175414.0 KB
Departments

Retrieve a department

Retrieve a department by its ID.

get/organization/structure/api/departments/{id}

Response

OK

idinteger
namestring
codestring

Unique code of this department.

descriptionstring nullable

Optional description of the department.

parentIdstring

Hierarchy ID of the parent department. Null if this department is at root-level.

parentLuccaIdinteger nullable
hierarchystring

A value that describes where a department sits in the organization tree. It encodes the department’s position and parent/child relationships, allowing the system to determine ancestors, descendants, and ordering within the hierarchy.

You may refer to the Microsoft documentation about hierarchyid for more information.

You should treat it as an opaque hierarchical path value—use it only for storage, comparison, and API calls, and do not attempt to parse or construct it yourself.

Example hierarchyId values:

  • '/1/'
    • '/1/1/'
      • '/1/1/2/'
      • '/1/1/2.5/'
      • '/1/1/3/'
    • '/1/3/'
isActiveboolean

When false, then the department should no longer be used.

headIdinteger nullable

ID of the employee at the head of this department.

createdAtstring date-time

Timestamp (with offset) of the moment this department was created.

lastModifiedAtstring date-time

Timestamp (with offset) of the moment this department was last modified.

sortOrderInSiblingsinteger nullable

Example response

{
  "id": 48,
  "name": "IT",
  "code": "IT",
  "description": null,
  "parentId": "/1/2/",
  "parentLuccaId": null,
  "hierarchy": "/1/2/2/",
  "isActive": true,
  "headId": 1080,
  "createdAt": "2000-01-01T00:00:00+00:00",
  "lastModifiedAt": "2000-01-01T00:00:00+00:00",
  "sortOrderInSiblings": null
}