Skip to main content
GET
/
organization
/
structure
/
api
/
departments
/
{id}
Retrieve a department
curl --request GET \
  --url https://{host}/organization/structure/api/departments/{id} \
  --header 'Authorization: <authorization>'
{
  "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
}

Headers

Authorization
string
required

API key. Value must be formatted like so: lucca application={api_key}.

Path Parameters

id
integer
required

ID of the department.

Required range: x >= 1

Response

200 - application/json

OK

Departments, to which users must be attached, are used by the different Lucca solutions for different purposes:

  • Define access scopes: for example to restrict the visibility of absences in the Lucca Absences schedule.
  • Filtering data in a report: our different reports generally allow to filter data according to the legal entity, the SSC, but also the department of the user.
  • Build the organization chart in Lucca Core HR. The departments are represented as a hierarchical tree with a parent/child relationship.

NB: You can have up to 9 levels of departments, and up to 99 departments under a single parent department. However, limiting the number of levels to 7 is recommended.

id
integer<int32>
Required range: x >= 1
name
string
Minimum string length: 1
code
string

Unique code of this department.

Minimum string length: 1
description
null | string

Optional description of the department.

parentId
string

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

parentLuccaId
null | integer
hierarchy
string

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/'
isActive
boolean
default:true

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

headId
null | integer

ID of the employee at the head of this department.

createdAt
string<date-time>

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

lastModifiedAt
string<date-time>

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

sortOrderInSiblings
null | integer
Required range: 0 <= x <= 99