{"id":13118,"date":"2020-10-30T13:37:26","date_gmt":"2020-10-30T12:37:26","guid":{"rendered":"https:\/\/wpstaging.timetrackapp.com\/api\/api-timesheets-employee-reports\/"},"modified":"2025-01-20T17:25:05","modified_gmt":"2025-01-20T16:25:05","slug":"timesheets-employee-reports","status":"publish","type":"page","link":"https:\/\/wpstaging.timetrackapp.com\/en\/api\/timesheets-employee-reports\/","title":{"rendered":"API &#8211; Timesheets &#8211; Employee reports"},"content":{"rendered":"\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-k6jj58ve-4d1f16dc3a5c8647855d83f7f4eaf395\">\n.avia-section.av-k6jj58ve-4d1f16dc3a5c8647855d83f7f4eaf395{\nbackground-repeat:no-repeat;\nbackground-image:url(https:\/\/wpstaging.timetrackapp.com\/wp-content\/uploads\/2020\/02\/img_are_you_freelancer.jpg);\nbackground-position:50% 50%;\nbackground-attachment:scroll;\n}\n.avia-section.av-k6jj58ve-4d1f16dc3a5c8647855d83f7f4eaf395 .av-section-color-overlay{\nopacity:1;\n}\n<\/style>\n<div id='call-to-action'  class='avia-section av-k6jj58ve-4d1f16dc3a5c8647855d83f7f4eaf395 main_color avia-section-large avia-no-border-styling  avia-builder-el-0  el_before_av_four_fifth  avia-builder-el-first  avia-bg-style-scroll av-section-color-overlay-active container_wrap fullsize'  data-section-bg-repeat='no-repeat'><div class=\"av-section-color-overlay-wrap\"><div class=\"av-section-color-overlay\"><\/div><div class='container av-section-cont-open' ><main  role=\"main\" itemprop=\"mainContentOfPage\"  class='template-page content  av-content-full alpha units'><div class='post-entry post-entry-type-page post-entry-13118'><div class='entry-content-wrapper clearfix'>\n<section  class='av_textblock_section av-k6jjc1w6-d2a3e2b3ffad0185ecf50fe4378d1a8d '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/CreativeWork\" ><div class='avia_textblock'  itemprop=\"text\" ><h1 class=\"custom_h1\" style=\"color: #fff;\">API<\/h1>\n<p><span style=\"color: #ffffff;\">Use TimeTrack Rest API to integrate TimeTrack with other systems.<br \/>\nHappy Coding!<\/span><\/p>\n<\/div><\/section>\n<\/div><\/div><\/main><!-- close content main element --><\/div><\/div><\/div><div id='after_section_1'  class='main_color av_default_container_wrap container_wrap fullsize'  ><div class='container av-section-cont-open' ><div class='template-page content  av-content-full alpha units'><div class='post-entry post-entry-type-page post-entry-13118'><div class='entry-content-wrapper clearfix'>\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-it6pf3-6923c67fb7bd2fae57e73e57a53455a9\">\n.flex_column.av-it6pf3-6923c67fb7bd2fae57e73e57a53455a9{\nborder-radius:0px 0px 0px 0px;\npadding:0px 0px 0px 0px;\n}\n<\/style>\n<div  class='flex_column av-it6pf3-6923c67fb7bd2fae57e73e57a53455a9 av_four_fifth  avia-builder-el-2  el_after_av_section  el_before_av_one_fifth  avia-builder-el-first  first flex_column_div av-zero-column-padding  '     ><section  class='av_textblock_section av-5dzxbao-ff2e6b2f2f3b105aee569e8ac6cf19bf '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/CreativeWork\" ><div class='avia_textblock page_api'  itemprop=\"text\" ><h2>Timesheets \/ Employee Reports<\/h2>\n<p>With Employee Reports you can generate reports for employees for specific time period.<\/p>\n<p>TimeTrack generates for each user and day timesheet records (daily report). You can get those records or you can get the grouped reports for specific time period.<\/p>\n<p>With reports endpoint you can:<\/p>\n<ul>\n<li>Get all daily timesheets \/ reports<\/li>\n<li>Generate grouped reports<\/li>\n<\/ul>\n<p>Daily-Reports have following params:<\/p>\n<table>\n<tbody>\n<tr>\n<th>Param<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>username<\/td>\n<td>Text<\/td>\n<td>Username<\/td>\n<\/tr>\n<tr>\n<td>workDate<\/td>\n<td>Text<\/td>\n<td>Date in format YYYY-MM-DD<\/td>\n<\/tr>\n<tr>\n<td>workStart<\/td>\n<td>Text<\/td>\n<td>Start timestamp<\/td>\n<\/tr>\n<tr>\n<td>workEnd<\/td>\n<td>Text<\/td>\n<td>End timestamp<\/td>\n<\/tr>\n<tr>\n<td>targetSeconds<\/td>\n<td>Integer<\/td>\n<td>Target hours in seconds<\/td>\n<\/tr>\n<tr>\n<td>workedSeconds<\/td>\n<td>Integer<\/td>\n<td>Actual hours in seconds<\/td>\n<\/tr>\n<tr>\n<td>workTargetDifference<\/td>\n<td>Integer<\/td>\n<td>Difference between actual and target<\/td>\n<\/tr>\n<tr>\n<td>breakSeconds<\/td>\n<td>Integer<\/td>\n<td>Break duration in seconds<\/td>\n<\/tr>\n<tr>\n<td>breakTimes<\/td>\n<td>Text<\/td>\n<td>Break times<\/td>\n<\/tr>\n<tr>\n<td>surchargeSeconds<\/td>\n<td>Integer<\/td>\n<td>Duration of surcharged time in seconds<\/td>\n<\/tr>\n<tr>\n<td>holidaySeconds<\/td>\n<td>Integer<\/td>\n<td>Duration of holiday time based on working model of employee. If on this date its a holiday and this is the regular working day for this employee, the holidaySeconds will be filled.<\/td>\n<\/tr>\n<tr>\n<td>absence1Seconds<\/td>\n<td>Integer<\/td>\n<td>Duration of absence 1 on this day<\/td>\n<\/tr>\n<tr>\n<td>absence1ShortName<\/td>\n<td>Text<\/td>\n<td>Absence 1 short code<\/td>\n<\/tr>\n<tr>\n<td>absence2Seconds<\/td>\n<td>Integer<\/td>\n<td>Duration of absence 2 on this day<\/td>\n<\/tr>\n<tr>\n<td>absence2ShortName<\/td>\n<td>Text<\/td>\n<td>Absence 2 short code<\/td>\n<\/tr>\n<tr>\n<td>absence3Seconds<\/td>\n<td>Integer<\/td>\n<td>Duration of absence 3 on this day<\/td>\n<\/tr>\n<tr>\n<td>absence3ShortName<\/td>\n<td>Text<\/td>\n<td>Absence 3 short code<\/td>\n<\/tr>\n<tr>\n<td>weekday<\/td>\n<td>Integer<\/td>\n<td>Index of weekday, 1 to 7. If its a holiday it will be 8.<\/td>\n<\/tr>\n<tr>\n<td>holiday<\/td>\n<td>Boolean<\/td>\n<td>Flag if this day is a holiday<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Get all daily reports<\/h3>\n<p>In this example we get all daily reports for user test between 2020-10-01 and 2020-10-31<\/p>\n<blockquote>\n<p>curl &#8220;https:\/\/testaccount.imetrackenterprise.com\/api\/v2\/ext\/work_reports?username=test&#038;from=2020-10-01T00:00:00Z&#038;to=2020-10-31T00:00:00Z&#8221;<br \/>\n-H &#8216;Content-Type: application\/json&#8217;<br \/>\n-H &#8216;X-TimeTrack-Api-Secret: <<em>API_SECRET_TOKEN><\/em>&#8216;<br \/>\n-H &#8216;X-TimeTrack-Api-Key: <<em>API_KEY><\/em>&#8216;<br \/>\n-d $'{}&#8217;<\/p>\n<\/blockquote>\n<h3>Generate grouped reports<\/h3>\n<p>Grouped report has following params:<\/p>\n<table>\n<tbody>\n<tr>\n<th>Param<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>username<\/td>\n<td>Text<\/td>\n<td>Username<\/td>\n<\/tr>\n<tr>\n<td>targetSeconds<\/td>\n<td>Integer<\/td>\n<td>Sum of target in seconds<\/td>\n<\/tr>\n<tr>\n<td>workedSeconds<\/td>\n<td>Integer<\/td>\n<td>Sum of actual in seconds<\/td>\n<\/tr>\n<tr>\n<td>workTargetDifference<\/td>\n<td>Integer<\/td>\n<td>Sum of difference between actual and target<\/td>\n<\/tr>\n<tr>\n<td>surchargedSeconds<\/td>\n<td>Integer<\/td>\n<td>Sum of surcharged time in seconds<\/td>\n<\/tr>\n<tr>\n<td>holidaySeconds<\/td>\n<td>Integer<\/td>\n<td>Sum of holiday time in seconds.<\/td>\n<\/tr>\n<tr>\n<td>absenceSeconds<\/td>\n<td>Integer<\/td>\n<td>Sum of absences in seconds<\/td>\n<\/tr>\n<tr>\n<td>targetSecondsDisplay<\/td>\n<td>Integer<\/td>\n<td>Sum of target in HH:mm<\/td>\n<\/tr>\n<tr>\n<td>workedSecondsDisplay<\/td>\n<td>Integer<\/td>\n<td>Sum of actual in HH:mm<\/td>\n<\/tr>\n<tr>\n<td>workTargetDifferenceDisplay<\/td>\n<td>Integer<\/td>\n<td>Sum of difference in HH:mm<\/td>\n<\/tr>\n<tr>\n<td>surchargedSecondsDisplay<\/td>\n<td>Integer<\/td>\n<td>Sum of surcharged in HH:mm<\/td>\n<\/tr>\n<tr>\n<td>holidaySecondsDisplay<\/td>\n<td>Integer<\/td>\n<td>Sum of holiday seconds in HH:mm.<\/td>\n<\/tr>\n<tr>\n<td>absenceSecondsDisplay<\/td>\n<td>Integer<\/td>\n<td>Sum of absence seconds in HH:mm<\/td>\n<\/tr>\n<tr>\n<td>absences<\/td>\n<td>List of Absence-Objects<\/td>\n<td>Absence list<\/td>\n<\/tr>\n<tr>\n<td>overtimeCarries<\/td>\n<td>List of OvertimeCarryObjects<\/td>\n<td>Overtime carries in this year<\/td>\n<\/tr>\n<tr>\n<td>vacationCarries<\/td>\n<td>List of VacationCarryObject<\/td>\n<td>Vacation carries in this year<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><\/h3>\n<p>In this example we generate report for user test for following time period 2020-08-01 &#8211; 2020-10-31<\/p>\n<blockquote>\n<p>curl &#8220;https:\/\/testaccount.imetrackenterprise.com\/api\/v2\/ext\/work_reports\/group?username=test&#038;from=2020-08-01T00:00:00Z&#038;to=2020-10-31T00:00:00Z&#8221;<br \/>\n-H &#8216;Content-Type: application\/json&#8217;<br \/>\n-H &#8216;X-TimeTrack-Api-Secret: <<em>API_SECRET_TOKEN><\/em>&#8216;<br \/>\n-H &#8216;X-TimeTrack-Api-Key: <<em>API_KEY><\/em>&#8216;<br \/>\n-d $'{}&#8217;<\/p>\n<\/blockquote>\n<\/div><\/section><\/div>\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-kguof6g6-97f8f79cefbcca3ddbdec2b8541426be\">\n.flex_column.av-kguof6g6-97f8f79cefbcca3ddbdec2b8541426be{\nborder-radius:0px 0px 0px 0px;\npadding:0px 0px 0px 0px;\n}\n<\/style>\n<div  class='flex_column av-kguof6g6-97f8f79cefbcca3ddbdec2b8541426be av_one_fifth  avia-builder-el-4  el_after_av_four_fifth  avia-builder-el-last  flex_column_div av-zero-column-padding  '     ><section  class='av_textblock_section av-kguoffk6-d0950a0656a04a66149fe09473bc1166 '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/CreativeWork\" ><div class='avia_textblock'  itemprop=\"text\" ><h2>Resources<\/h2>\n<ul>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/clients\/\">Clients<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/projects\/\">Projects<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/tasks\/\">Tasks<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/project-time-entries\/\">Project Time Entries<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/expenses\/\">Expenses<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/attendance-time-entries\/\">Attendances<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/absences\/\">Absences<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/absence-types\/\">Absence Types<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/timer\/#projekt-stempeluhr\">Project Timer<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/timer\/#arbeitszeit-stempeluhr\">Attendance Timer<\/a><\/li>\n<li><a href=\"https:\/\/wpstaging.timetrackapp.com\/en\/api\/timesheets-employee-reports\/\">User Reports<\/a><\/li>\n<\/ul>\n<\/div><\/section><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":13043,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-13118","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/pages\/13118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/comments?post=13118"}],"version-history":[{"count":0,"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/pages\/13118\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/pages\/13043"}],"wp:attachment":[{"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/media?parent=13118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/categories?post=13118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpstaging.timetrackapp.com\/en\/wp-json\/wp\/v2\/tags?post=13118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}