clocko:do API:
Get co-worker reports

Endpoint api/userreports

With this resource, you can access all information which you know from the co-worker reports.

For example the working time evaluation of each day, as well es the holiday account of each co-worker.

Object type "userreport"

Please note, that the property »month_details« of the object type »userreport« can contain an array of further objects of type "userreport_month", so that a nested array structure gets generated.

See also this example of a return.

Parameter Type Description
users_idinteger
ID of the corresponding co-worker
users_namestring
Name of the corresponding co-worker
users_numberstring|null
Personnel number of the corresponding co-worker
users_emailstring
Email address of the corresponding co-worker
sum_targetinteger|null
Planned work time for the year (in seconds)
sum_hoursinteger
Worked time in the year (in seconds)
sum_reduction_usedinteger
Sum of overtime reductions in the year (in seconds)
sum_reduction_plannedinteger
Sum of planned overtime reductions in the rest of the year (in seconds)
overtime_carryoverinteger
Overtime carryover for the year (in seconds)
overtime_reducedinteger
Withdrawed overtime for the year (in seconds)
diffinteger
Calculated difference of the time account of the year (in seconds)
holidays_quotafloat
Holiday quota for the year
holidays_carryfloat
Holiday carryover for the year
sum_absence[regular_holidays]float
Number of used holidays
sum_absence[sick_self]integer
Number of sick days
sum_absence[sick_child]integer
Number of sick days of a child
sum_absence[special_leaves]float
Number of days of special leaves
sum_absence[school]float
Number of days of school
sum_absence[maternity_protection]float
Number of days of maternity protection
sum_absence[home_office]float
Number of days of home office
sum_absence[out_of_office]float
Number of days out of office
sum_absence[quarantine]integer
Number of days of quarantine
sum_absence[military_service]integer
Number of days of military / alternative service
holidays_usedfloat
Number of used holidays
DEPRECATED. This column won't be delivered after 01.01.2020.
special_holidaysfloat
Number of days of special leaves in the year
DEPRECATED. This column won't be delivered after 01.01.2020.
sickdaysfloat
Number of sick days in the year
DEPRECATED. This column won't be delivered after 01.01.2020.
month_detailsArray of objects of the type "userreport_month"
Only if month details are requested

Object type "userreport_month"

This object type gets used in the property »month_details« of the object type »userreport«.

Parameter Type Description
nrinteger
Month number (1 to 12)
sum_targetinteger|null
Planned work time (in seconds)
sum_hoursinteger
Worked time (in seconds)
sum_hours_without_ compensationinteger
Worked time when ignoring the monthly compensation (in seconds)
sum_reduction_usedinteger
Sum of overtime reductions (in seconds)
sum_overtime_reducedint
Sum of withdrawed / payed out overtime
diffinteger
Calculated difference of the time account (in seconds)
sum_reductionnull
Delivers null due to backward compatibility reasons
DEPRECATED. This column won't be delivered after 01.01.2020.
week_detailsArray of objects of the type "userreport_week"
Only if week details are requested

Object type "userreport_week"

This object type gets used in the property »week_details« of the object type »userreport_month«.

Parameter Type Description
nrinteger
Week number (following ISO 8601)
sum_targetinteger|null
Planned work time (in seconds)
sum_hoursinteger
Worked time (in seconds)
sum_reduction_usedinteger
Sum of overtime reductions (in seconds)
diffinteger
Calculated difference of the time account (in seconds)
sum_reductionnull
Delivers null due to backward compatibility reasons.
DEPRECATED. This column won't be delivered after 01.01.2020.
day_detailsArray of objects of the type "userreport_day"
Only if day details are requested

Object type „userreport_day“

This object type gets used in the property »day_details« of the object type »userreport_week«.

Parameter Type Description
datestring
Date (YYYY-MM-DD)
weekdayinteger
Number, which identificates the week day
nonbusinessboolean
Is the day a nonbusiness day?
targetinteger|null
Planned work time (in seconds)
target_rawinteger|null
Planned work time which would have been calculated if no nunbusiness day or absence had reduced the planned work time (in seconds)
hoursinteger|null
Worked time (in seconds)
Won't be added for future days
hours_without_compensationinteger|null
Worked time when ignoring the daily compensation (in seconds)
Won't be added for future days
diffinteger
Calculated difference of the time account (in seconds)
Won't be added for future days
work_startstring|null
Begin of the work time (e.g. in format “YYYY-MM-DD HH:MM:SS”; see section “Localisation”)
Only if requested (report type “4”); won't be added for future days
work_endstring|null
End of the work time (e.g. in format “YYYY-MM-DD HH:MM:SS”; see section “Localisation”)
Only if requested (report type “4”), won't be added for future days
breaksarray
Breaks which habe been made (Subarray keys: [string] since, [string] until, [integer] length)
Only if requested (report type “4”), won't be added for future days
count_absence[regular_holidays]float
Absence because of a regular holiday or special leaves (0, 0.5 or 1)
count_absence[sick_self]int
Absence because of sickness (0 or 1)
count_absence[sick_child]int
Absence because of sickness of a child (0 or 1)
count_absence[special_leaves]float
Absence because of special leaves (0, 0.5 or 1)
count_absence[school]float
Absence because of school / further education (0, 0.5 or 1)
count_absence[maternity_protection]float
Absence because of maternity protection (0, 0.5 or 1)
count_absence[home_office]float
Home office (0, 0.5 or 1)
count_absence[out_of_office]float
Work out of office (0, 0.5 or 1)
count_absence[quarantine]integer
Absence because of quarantine (0 or 1)
count_absence[military_service]integer
Absence because of military / alternative service (0 or 1)
count_reduction_usedinteger|null
Overtime reduction on this day (in seconds)
count_holidaysfloat
Absence because of a regular holiday or special leaves (0, 0.5 or 1)
DEPRECATED. This column won't be delivered after 01.01.2020.
count_regular_holidaysfloat
Absence because of a regular holiday (0, 0.5 or 1)
DEPRECATED. This column won't be delivered after 01.01.2020.
count_special_leavesfloat
Absence because of special leaves (0, 0.5 or 1)
DEPRECATED. This column won't be delivered after 01.01.2020.
count_sickfloat
Absence because of sickness (0, 0.5 or 1)
DEPRECATED. This column won't be delivered after 01.01.2020.
count_ot_reductionnull
Delivers null due to backward compatibility reasons.
DEPRECATED. This column won't be delivered after 01.01.2020.

Query co-worker reports for all co-workers

Request
GET /api/userreports
Required parameters yearinteger
Optional parameters typeinteger
0: Request only key data for the year (default)
1: Request key data for the year and the months
2: Request key data for the year, months and weeks
3: Request key data for the year, months, weeks and days
4: Request key data for the year, months, weeks and days; The day data does also include start and end times, as well as breaks
Response
{
  "userreports": 
  [
    [object of type userreport],
    [object of type userreport], 
    ...
  ]
}
Example of a nested response with all details
{
  "userreports": 
  [
    {
      'id' : 123,
      'name': 'John Doe',
      'sum_target': 1419,
      ...
      'month_details' : 
      [
      	{
          'nr': 1,
          'sum_target': 142,
          ...,
          'week_details': 
          [
            {
              'nr': 1,
              'sum_target': 40,
              ...
              'day_details': 
              [
                {
                  'date': '2016-01-01',
                  'weekday': 5,
                  ...
                },
                {
                  'date': '2016-01-01',
                  'weekday': 6,
                  ...
                },
                ...
                [FURTHER DAYS OF THE WEEK]
              ]
            },
            {
              'nr': 2,
              'sum_target': 40,
              ...
              'day_details': 
              [
                {
                  'date': '2016-01-04',
                  'weekday': 1,
                  ...
                },
                {
                  'date': '2016-01-05',
                  'weekday': 2,
                  ...
                },
                ...
                [FURTHER DAYS OF THE WEEK]
              ]
            },
            ... 
            [FURTHER WEEKS]
          ]
      	},
      	...
      	[FURTHER MONTHS]
      ]
    },
    ...
    [FURTHER REPORTS TO CO-WORKERS]
  ]
}

Query the co-worker report for a selected co-worker

Request
GET /api/userreports/[Users-ID]
Required parameters year (integer)
Optional parameters type
0: Request only key data for the year (default)
1: Request key data for the year and the months
2: Request key data for the year, months and weeks
3: Request key data for the year, months, weeks and days
4: Request key data for the year, months, weeks and days; The day data does also include start and end times, as well as breaks
Response
{
  "userreport": [object of type userreport]
}

Please see also the information in the section »Query co-worker reports for all co-workers«.

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 15 000 autres entreprises :

Bechtle Mannheim LogoBechtlePeerigon LogoPeerigon GmbH
Phoenix Logistik LogoPhoenix LogistikFieda LogoFidea