clocko:do API:
Manage target hours

Endpoint api/targethours

With this resource you can manage all target hour settings.

Abstract object type "targethoursRow"

Parameter Type Description
idinteger
The ID of the target hour settings
typestring
Type of target hours:
'weekly': weekly target hours
'monthly': monthly target hours
date_sincestring
Date from which on the target hours apply
Format YYYY-MM-DD
date_untilstring|null
Date until which the target hours apply
Format YYYY-MM-DD
compensation_monthlyfloat
Automatic time compensation per month in hours
users_idinteger
The related employee's ID

Object type "targethoursRowWeekly"

Object type „targethoursRow“ extended by:

Parameter Type Description
mondayfloat
target hours for Monday
tuesdayfloat
target hours for Tuesday
wednesdayMittwoch
target hours for Wednesday
thursdayfloat
target hours for Thursday
fridayfloat
target hours for Friday
saturdayfloat
target hours for Saturday
sundayfloat
target hours for Sunday
absence_fixed_creditboolean
true if credited absence hours are applied against the average target hours, false if credited absence hours match the target hours of the specific day
compensation_dailyfloat
Automatic time compensation per day in minutes

Object type "targethoursRowMonthly"

Object type „targethoursRow“ extended by:

Parameter Type Description
monthly_targetfloat
Monthly target hours to attain
workday_tuesdayboolean
Is Tuesday a work day?
workday_wednesdayboolean
Is Wednesday a work day?
workday_thursdayboolean
Is Thursday a work day?
workday_fridayboolean
Is Friday a work day?
workday_saturdayboolean
Is Saturday a work day?
workday_sundayboolean
Is Sunday a work day?
workday_mondayboolean
Is Monday a work day?

List target hours

Request
GET /api/targethours
Optional parameters users_id (integer)
Restrict data to this user
Response
{
  "targethours": 
  {
    [object of type targethoursRow],
    [object of type targethoursRow], 
    ...
  }
}

Request single target hour setting

Request
GET /api/targethours/[ID]
Response
{
  "targethours": [object of type targethoursRow]
}

Add target hours

Request
POST /api/targethours
Required parameters for type: weekly users_id, type, monday, tuesday, wednesday, thursday, friday, saturday, sunday, compensation_daily, compensation_monthly
Required parameters for type: monthly users_id, type, workday_monday, workday_tuesday, workday_wednesday, workday_thursday, workday_friday, workday_saturday, workday_sunday, monthly_target, compensation_monthly
Optional parameters date_until
Response
{
  "targethours": [object of type targethoursRow]
}

Edit target hours

Request
PUT /api/targethours/[ID]
Required parameters for type: weekly users_id, type, monday, tuesday, wednesday, thursday, friday, saturday, sunday, compensation_daily, compensation_monthly
Required parameters for type: monthly users_id, type, workday_monday, workday_tuesday, workday_wednesday, workday_thursday, workday_friday, workday_saturday, workday_sunday, monthly_target, compensation_monthly
Optional parameters date_until
Response
{
  "targethours": [object of type targethoursRow]
}

Delete target hours

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

Our Customer-Success-Team will answer your questions.

Contact now!

Test all functions 14 days free of charge

By submitting this form you accept our terms and conditions and our privacy policy and you confirm that you will use clockodo as a commercial user.

Take advantage of the experience of 6,000 other companies:

Bechtle Mannheim LogoBechtlePeerigon LogoPeerigon GmbH
Phoenix Logistik LogoPhoenix LogistikFieda LogoFidea