Your browser is not up to date. This may cause security, speed, and display
issues. Please update your browser.
Update Browser
X
With this resource, you can query all absences, add new ones and edit, accept or decline existing ones.
Feel free to use our updated API documentation.
| Parameter | Type | Description |
|---|---|---|
| id | integer |
ID of the absence
|
| users_id | integer |
ID of the corresponding co-worker
|
| date_since | string |
Start date in YYYY-MM-DD format
|
| date_until | string |
End date in YYYY-MM-DD format
|
| status | integer |
Status of the absence: 0: enquired/reported 1: approved 2: declined 3: approval cancelled 4: request cancelled |
| type | integer |
Type of the absence: 1: Regular holiday 2: Special leaves 3: Reduction of overtime 4: Sick day 5: Sick day of a child 6: School / further education 7: Maternity protection 8: Home office (planned hours are applied) 9: Work out of office (planned hours are applied) 10: Special leaves (unpaid) 11: Sick day (unpaid) 12: Sick day of a child (unpaid) 13: Quarantine (only full days) 14: Military / alternative service (only full days) 15: Sick day (sickness benefit)
Only with access rights for absence administration or in case of own absences
|
| note | string|null |
Note
Only with access rights for absence administration or in case of own absences
|
| count_days | float |
Amount of absence days (null for overtime reduction)
Only with access rights for absence administration or in case of own absences
|
| count_hours | float|null |
Amount of hours of overtime reduction (null in other cases)
Only with access rights for absence administration or in case of own absences
|
| sick_note | boolean|null |
Is there a doctor's sick note?
For the types 4 and 5
|
| date_enquired | string|null |
Date at which the absence request has been enquired in YYYY-MM-DD format
Only with access rights for absence administration or in case of own absences
|
| date_approved | string|null |
Date at which the absence request has been approved, declined or cancelled in format YYYY-MM-DD
Only with access rights for absence administration or in case of own absences
|
| approved_by | integer|null |
The ID of the co-worker who has approved, declined or cancelled the request
Only with access rights for absence administration or in case of own absences
|
GET /api/absences
| Required parameters | year (integer) |
|---|
| Optional parameters | users_id (integer) |
|---|
{
"absences":
{
[object of type absence],
[object of type absence],
...
}
}GET /api/absences/[ID]
{
"absence": [object of type absence]
}POST /api/absences
| Required parameters | date_since, date_until, type |
|---|
| Optional parameters | users_id (if not submitted, the absence will be added for the current API user), note, count_days (0.5 for a half day, gets calculated automatically for longer absences), count_hours (will be calculated if empty), status (only 0 or 1), sick_note |
|---|
{
"absence": [object of type absence]
}PUT /api/absences/[ID]
| Required parameters | keine |
|---|
| Optional parameters | date_since, date_until, note, type, status, count_days (0.5 for a half day, gets calculated automatically for longer absences), count_hours (will be recalculated if you submit null), sick_note |
|---|
{
"absence": [object of type absence]
}Only possible with access rights for absence administration and only if the absence has already been cancelled or declined.
DELETE /api/absences/[ID]
{
"success": true
}