REST DocumentationDepartmentsGET Get a single department

Get a single department

Returns one department by its identifier, including its manager and the count of its child departments.

Availability: Full version and ZEP Clock

Request

GET /api/v1/departments/{id}
curl --request GET \
     --url 'https://www.zep-online.de/zepinstanz/next/api/v1/departments/{id}' \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {token}'

Path parameters

  • Name
    id
    Type
    integer
    Description

    The department ID

Response

{
  "data": {
    "id": null,
    "parent_id": 1,
    "name": "EU",
    "description": "Angebot|en:offer",
    "comments": "Wichtiger Kunde - mit Sorgfalt behandeln",
    "status": true,
    "manager": [
      {
        "username": "max.mustermann",
        "firstname": "Max",
        "lastname": "Mustermann",
        "personal_number": "1",
        "email": "erika.mustermann@acme-corp.de"
      }
    ],
    "children": [
      {}
    ],
    "manager_count": 2,
    "children_count": 10,
    "created": "2024-07-20T11:30:00.000000Z",
    "modified": "2024-07-20T12:30:00.000000Z"
  }
}

Response fields

  • Name
    id
    Type
    any
    Description

    Unique identifier of the department.

  • Name
    parent_id
    Type
    integer, nullable
    Description

    Identifier of the parent department, if this department is nested under one.

  • Name
    name
    Type
    string
    Description

    Display name of the department.

  • Name
    description
    Type
    string, nullable
    Description

    Free-text description of the department’s purpose or scope.

  • Name
    comments
    Type
    string, nullable
    Description

    Free-text internal comments on the department.

  • Name
    status
    Type
    boolean, nullable
    Description

    Whether the department is currently active.

  • Name
    manager
    Type
    array of DepartmentManager
    Description

    The employee currently assigned as this department’s manager.

  • Name
    manager.username
    Type
    string
    Description

    Unique login name of the department manager.

  • Name
    manager.firstname
    Type
    string
    Description

    Given name of the department manager.

  • Name
    manager.lastname
    Type
    string
    Description

    Family name of the department manager.

  • Name
    manager.personal_number
    Type
    string, nullable
    Description

    Personnel number of the department manager.

  • Name
    manager.email
    Type
    string, nullable
    Description

    Business email address of the department manager.

  • Name
    children
    Type
    array of Department
    Description

    The departments directly nested under this department.

  • Name
    children.id
    Type
    any
    Description

    Unique identifier of the department.

  • Name
    children.parent_id
    Type
    integer, nullable
    Description

    Identifier of the parent department, if this department is nested under one.

  • Name
    children.name
    Type
    string
    Description

    Display name of the department.

  • Name
    children.description
    Type
    string, nullable
    Description

    Free-text description of the department’s purpose or scope.

  • Name
    children.comments
    Type
    string, nullable
    Description

    Free-text internal comments on the department.

  • Name
    children.status
    Type
    boolean, nullable
    Description

    Whether the department is currently active.

  • Name
    children.manager
    Type
    array of DepartmentManager
    Description

    The employee currently assigned as this department’s manager.

  • Name
    children.children
    Type
    array of Department
    Description

    The departments directly nested under this department.

  • Name
    children.manager_count
    Type
    integer
    Description

    Whether a department manager is currently assigned.

  • Name
    children.children_count
    Type
    integer
    Description

    Number of departments directly nested under this department.

  • Name
    children.created
    Type
    string (date-time), nullable
    Description

    Timestamp the department was created.

  • Name
    children.modified
    Type
    string (date-time), nullable
    Description

    Timestamp the department was last modified.

  • Name
    manager_count
    Type
    integer
    Description

    Whether a department manager is currently assigned.

  • Name
    children_count
    Type
    integer
    Description

    Number of departments directly nested under this department.

  • Name
    created
    Type
    string (date-time), nullable
    Description

    Timestamp the department was created.

  • Name
    modified
    Type
    string (date-time), nullable
    Description

    Timestamp the department was last modified.

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