REST DocumentationDepartmentsPOST Assign a department manager

Assign a department manager

Makes the employee a manager of the department and gives them the department lead role of Roles & Permissions for this department, as an assignment in the user interface does. An employee who already manages the department answers 422 on username; is_deputy needs the Inovex module. Requires the Locations & Departments module.

Availability: Full version and ZEP Clock

Request

POST /api/v1/departments/{id}/managers
curl --request POST \
     --url 'https://www.zep-online.de/zepinstanz/next/api/v1/departments/{id}/managers' \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {token}' \
     --header 'Content-Type: application/json' \
     --data '{
       "username": "max.mustermann",
       "is_deputy": true
     }'

Path parameters

  • Name
    id
    Type
    integer
    Description

    The department ID

Request body

  • Name
    username
    Type
    string, required
    Description

    Username of the employee who becomes a manager of the department. An employee without a current employment can be assigned as well.

  • Name
    is_deputy
    Type
    boolean
    Description

    Whether the employee is the deputy of the department manager. Only with the Inovex module; without it the field is refused.

Response

{
  "data": {
    "username": "max.mustermann",
    "firstname": "Max",
    "lastname": "Mustermann",
    "personal_number": "1",
    "email": "erika.mustermann@acme-corp.de",
    "is_deputy": true
  }
}

Response fields

  • Name
    username
    Type
    string
    Description

    Unique login name of the department manager.

  • Name
    firstname
    Type
    string
    Description

    Given name of the department manager.

  • Name
    lastname
    Type
    string
    Description

    Family name of the department manager.

  • Name
    personal_number
    Type
    string, nullable
    Description

    Personnel number of the department manager.

  • Name
    email
    Type
    string, nullable
    Description

    Business email address of the department manager.

  • Name
    is_deputy
    Type
    boolean
    Description

    Whether the person is the deputy of the department manager; only the Inovex module sets it, an unset value reads false.

Generated from the OpenAPI specification — edit the source code, not this page.