New API version v7.4.2 has been released! 🎉
REST Documentation
GET All Absences

Get All Absences

You can use this endpoint to call up a paginated list of all absences.

Request

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

Response

{
	"data": [
		{
			"id": 1,
			"employee_id": "john.doe",
			"type": 0,
			"start_date": "2024-01-15T00:00:00.000000Z",
			"end_date": "2024-01-16T00:00:00.000000Z",
			"hours": "0.0000000000",
			"from": null,
			"to": null,
			"note": null,
			"approved": true,
			"timezone": null,
			"created": null,
			"modified": null,
			"absence_reason_id": "FA",
			"absenceReason": {
				"name": "FA",
				"comment": "Freizeitausgleich|en:Compensation",
				"approve": 1,
				"allow_self_entry": 1,
				"allow_half_day_holiday": 1,
				"allow_hours_of_vacation": 1,
				"anyone_can_see_name": 0,
				"color": "#1f8a70",
				"type": {
					"id": 3,
					"name": "flexitime"
				},
				"client_calendar_category": null,
				"inform_employee_upon_approval_or_revocation": 1,
				"created": null,
				"modified": null
			},
			"leaveApprovalApplication": null
		},
		{
			"id": 2,
			"employee_id": "jane.smith",
			"type": 0,
			"start_date": "2024-02-20T00:00:00.000000Z",
			"end_date": "2024-02-20T00:00:00.000000Z",
			"hours": "0.0000000000",
			"from": null,
			"to": null,
			"note": null,
			"approved": true,
			"timezone": null,
			"created": null,
			"modified": null,
			"absence_reason_id": "UB",
			"absenceReason": {
				"name": "UB",
				"comment": "Urlaub|en:Holiday",
				"approve": 1,
				"allow_self_entry": 1,
				"allow_half_day_holiday": 1,
				"allow_hours_of_vacation": 1,
				"anyone_can_see_name": 1,
				"color": "#f39c12",
				"type": {
					"id": 0,
					"name": "annual holiday"
				},
				"client_calendar_category": null,
				"inform_employee_upon_approval_or_revocation": 1,
				"created": null,
				"modified": null
			},
			"leaveApprovalApplication": null
		}
	]
}

Optional Parameters

  • Name
    start_date
    Type
    date | Y-m-d
    Description

    First day of the period to be queried. It is inclusive, so the day specified as start_date will also be considered on the results

  • Name
    end_date
    Type
    date | Y-m-d
    Description

    Last day of the period to be queried. It is inclusive, so the day specified as end_date will also be considered on the results.

  • Name
    employee_id
    Type
    string
    Description

    The username of the employee whose absences are to be queried.

  • Name
    limit
    Type
    integer
    Description

    Attribute for limiting the number of entries per page