REST DocumentationEmployeesGET List an employee's absences

List an employee’s absences

Returns the paginated list of absences recorded for the given employee.

Availability: Full version and ZEP Clock

Request

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

Path parameters

  • Name
    username
    Type
    string
    Description

    The employee username

Query parameters

  • Name
    page
    Type
    integer, nullable
    Description

    The page of results to return, counting from 1.

Response

{
  "data": [
    {
      "id": 1,
      "employee_id": "max.mustermann",
      "type": 0,
      "start_date": "2024-01-15T00:00:00.000000Z",
      "end_date": "2024-01-16T00:00:00.000000Z",
      "hours": 1.5,
      "from": "string",
      "to": "string",
      "note": "Familienurlaub",
      "approved": true,
      "timezone": "Asia/Oral",
      "created": "2024-07-20T11:30:00.000000Z",
      "modified": "2024-07-20T12:30:00.000000Z",
      "absence_reason_id": "UB",
      "absenceReason": {
        "name": "EU",
        "comment": "Elternurlaub|en:Parental leave",
        "approve": true,
        "allow_self_entry": true,
        "allow_half_day_holiday": 1,
        "allow_hours_of_vacation": 1,
        "anyone_can_see_name": true,
        "color": "#664599",
        "type": {
          "id": 1,
          "name": "annual holiday"
        },
        "client_calendar_category": "string",
        "inform_employee_upon_approval_or_revocation": 1,
        "external_id": "string",
        "created": "2024-07-20T11:30:00.000000Z",
        "modified": "2024-07-20T12:30:00.000000Z"
      },
      "leaveApprovalApplication": {
        "id": 1,
        "employee_id": "max.mustermann",
        "requested_at": "2024-01-10 13:04:34",
        "number_of_days": 1.5,
        "start_date": "2024-01-15T00:00:00.000000Z",
        "end_date": "2024-01-16T00:00:00.000000Z",
        "note": "Familienurlaub",
        "status": {
          "id": 1,
          "name": "Requested"
        },
        "recipient": "vorgesetzter@beispiel.de",
        "recipient_cc": "personal@beispiel.de",
        "recipient_bcc": "string",
        "status_edited_since": "2024-01-11 10:30:00",
        "status_edited_by": "vorgesetzter.nutzer",
        "status_note": "Genehmigt - Schönen Urlaub!",
        "absence_text": "Urlaubsantrag für Familienausflug"
      }
    }
  ],
  "links": {
    "first": "string",
    "last": "string",
    "prev": "string",
    "next": "string"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": "string",
        "label": "string",
        "active": true
      }
    ],
    "path": "string",
    "per_page": 1,
    "to": 1,
    "total": 1
  }
}

Response fields

  • Name
    id
    Type
    integer
    Description

    Unique identifier of the absence.

  • Name
    employee_id
    Type
    string
    Description

    Username of the employee this absence belongs to.

  • Name
    type
    Type
    integer
    Description

    Whether the absence spans a full day, a half day or a number of hours.

    One of: 0, 1, 2

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

    First calendar day the absence covers.

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

    Last calendar day the absence covers.

  • Name
    hours
    Type
    number, nullable
    Description

    Number of hours absent, only set for an hourly absence.

  • Name
    from
    Type
    string, nullable
    Description

    Time the hourly absence starts, only set for an hourly absence.

  • Name
    to
    Type
    string, nullable
    Description

    Time the hourly absence ends, only set for an hourly absence.

  • Name
    note
    Type
    string, nullable
    Description

    Free-text note attached to the absence.

  • Name
    approved
    Type
    boolean
    Description

    Whether the absence has been approved rather than merely planned.

  • Name
    timezone
    Type
    string, nullable
    Description

    Timezone the absence’s from/to times are expressed in.

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

    Timestamp the absence was recorded.

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

    Timestamp the absence was last modified.

  • Name
    absence_reason_id
    Type
    string
    Description

    Identifier of the absence reason (vacation, illness, …) this absence is filed under.

  • Name
    absenceReason
    Type
    object (AbsenceReason)
    Description

    The absence reason this absence is filed under.

  • Name
    absenceReason.name
    Type
    string
    Description

    Unique short code identifying the reason; also its route key.

  • Name
    absenceReason.comment
    Type
    string, nullable
    Description

    Free-text note shown alongside the reason in the calendar and reports.

  • Name
    absenceReason.approve
    Type
    boolean, nullable
    Description

    Whether a booking with this reason needs approval before it counts.

  • Name
    absenceReason.allow_self_entry
    Type
    boolean
    Description

    Whether employees may book this reason themselves without going through a supervisor.

  • Name
    absenceReason.allow_half_day_holiday
    Type
    integer, nullable
    Description

    Whether this reason can be booked for half a day instead of only full days.

  • Name
    absenceReason.allow_hours_of_vacation
    Type
    integer, nullable
    Description

    Whether this reason can be booked in individual hours instead of only whole days.

  • Name
    absenceReason.anyone_can_see_name
    Type
    boolean, nullable
    Description

    Whether colleagues who did not book the absence can still see this reason’s name.

  • Name
    absenceReason.color
    Type
    string
    Description

    Colour used to highlight bookings of this reason in the calendar.

  • Name
    absenceReason.type
    Type
    object, nullable
    Description

    The category of absence this reason represents, e.g. annual holiday, paid or unpaid absence, flexitime or homeoffice.

  • Name
    absenceReason.client_calendar_category
    Type
    string, nullable
    Description

    Category this reason maps onto in an external calendar synced from the client.

  • Name
    absenceReason.inform_employee_upon_approval_or_revocation
    Type
    integer, nullable
    Description

    Whether the employee is emailed when a booking of this reason is approved or revoked.

  • Name
    absenceReason.external_id
    Type
    string, nullable
    Description

    Identifier used to map this reason onto the matching absence type in a connected external system.

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

    Timestamp the reason was created.

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

    Timestamp the reason was last modified.

  • Name
    leaveApprovalApplication
    Type
    object (LeaveApprovalApplication)
    Description

    The leave-approval application this absence went through, if the tenant requires absences to be approved before they take effect.

  • Name
    leaveApprovalApplication.id
    Type
    integer
    Description

    Unique identifier of the leave-approval application.

  • Name
    leaveApprovalApplication.employee_id
    Type
    string
    Description

    Username of the employee who requested the leave.

  • Name
    leaveApprovalApplication.requested_at
    Type
    string (date-time), nullable
    Description

    Timestamp the leave request was submitted.

  • Name
    leaveApprovalApplication.number_of_days
    Type
    number
    Description

    Number of days the requested leave covers.

  • Name
    leaveApprovalApplication.start_date
    Type
    string (date-time), nullable
    Description

    First calendar day of the requested leave.

  • Name
    leaveApprovalApplication.end_date
    Type
    string, nullable
    Description

    Last calendar day of the requested leave.

  • Name
    leaveApprovalApplication.note
    Type
    string
    Description

    Free-text note attached to the leave request.

  • Name
    leaveApprovalApplication.status
    Type
    object
    Description

    Current approval status of the leave request (e.g. pending, approved, rejected).

  • Name
    leaveApprovalApplication.recipient
    Type
    string
    Description

    Primary recipient the approval request was sent to.

  • Name
    leaveApprovalApplication.recipient_cc
    Type
    string
    Description

    Additional recipients the approval request was copied to.

  • Name
    leaveApprovalApplication.recipient_bcc
    Type
    string
    Description

    Additional recipients blind-copied on the approval request.

  • Name
    leaveApprovalApplication.status_edited_since
    Type
    string (date-time), nullable
    Description

    Timestamp since which the current status has been in effect.

  • Name
    leaveApprovalApplication.status_edited_by
    Type
    string
    Description

    Username of who last changed the approval status.

  • Name
    leaveApprovalApplication.status_note
    Type
    string
    Description

    Free-text note left when the approval status was last changed.

  • Name
    leaveApprovalApplication.absence_text
    Type
    string
    Description

    Rendered text summarizing the requested absence, as shown to approvers.

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