v1

latestOpenAPI 3.1.02026-07-14159142161.9 KB
departments (usersService)

Update department by id

Update department data (set head department, move users, set parent department) Available only for head parent department or users with admin permissions. Returns updated department data

patch/company/v1/departments/{departmentId}

Request body

namestring
headIdstring
descriptionstring
parentDepartmentIdstring

Example request

{
  "name": "Frontend department",
  "description": "example"
}

Response

OK

idinteger
descriptionstring
namestring
headIdstring
parentDepartmentIdstring
usersIdsstring
rolesstring[]

Example response

{
  "id": 1,
  "description": "Test department",
  "name": "Frontend department",
  "roles": [
    "OWNER",
    "Employee",
    "ADMIN"
  ]
}