Clockodo API:
Manage absences

Endpoint api/absences

With this resource, you can query all absences, add new ones and edit, accept or decline existing ones.

Object type "absence"

Parameter Type Description
idinteger
ID of the absence
users_idinteger
ID of the corresponding co-worker
date_sincestring
Start date in YYYY-MM-DD format
date_untilstring
End date in YYYY-MM-DD format
statusinteger
Status of the absence:
0: enquired/reported
1: approved
2: declined
3: approval cancelled
4: request cancelled
typeinteger
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
notestring|null
Note
Only with access rights for absence administration or in case of own absences
count_daysfloat
Amount of absence days (null for overtime reduction)
Only with access rights for absence administration or in case of own absences
count_hoursfloat|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_noteboolean|null
Is there a doctor's sick note?
For the types 4 and 5
date_enquiredstring|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_approvedstring|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_byinteger|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

List absences

Request
GET /api/absences
Required parameters year (integer)
Optional parameters users_id (integer)
Response
{
  "absences": 
  {
    [object of type absence],
    [object of type absence], 
    ...
  }
}

Get a selected absence

Request
GET /api/absences/[ID]
Response
{
  "absence": [object of type absence]
}

Add a new absence / absence request

Request
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
Response
{
  "absence": [object of type absence]
}

Edit absence

Request
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
Response
{
  "absence": [object of type absence]
}

Delete absence

Only possible with access rights for absence administration and only if the absence has already been cancelled or declined.

Request
DELETE /api/absences/[ID]
Response
{
  "success": true
}
stripes illustration
Contact us!

Our Customer-Success-Team will answer your questions.

Contact now!
Essayer gratuitement de toutes les fonctions pendant 14 jours
En soumettant le formulaire vous reconnaissez nos conditions générales et notre déclaration de confidentialité et confirmez d’utiliser Clockodo en tant qu’ entrepreneur.

Profitez de l'expérience de 10 000 autres entreprises :

Bechtle Mannheim LogoBechtlePeerigon LogoPeerigon GmbH
Phoenix Logistik LogoPhoenix LogistikFieda LogoFidea