Get Time Logs API
This API is used to fetch a specific time log.
Request URL:
https://people.zoho.com/people/api/timetracker/gettimelogs?fromDate=<fromDate>&toDate= <toDate>&billingStatus=<billingStatus>&jobId=<jobId>&user =<user>&dateFormat=<dateFormat>
Header:
Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Scope:
ZOHOPEOPLE.timetracker.ALL
OR
ZOHOPEOPLE.timetracker.READ
Possible Operation Types:
ALL - Complete access to data
READ - Only to read data
Request parameter:
Parameters | Values Allowed | Default Value | Description |
*user | < all | ERECNO | Email-ID | Employee-ID > | <current user> | Specify user whose timelogs needs to be fetched |
jobId | <jobId> | all | Specify jobId for which timelogs needs to be fetched |
fromDate | <date in yyyy-MM-dd/company dateformat> | <current date> | Specify the date from when timelogs performed needs to be fetched |
toDate | <date in yyyy-MM-dd/company dateformat> | <current date> | Specify the date uptill when timelogs performed needs to be fetched |
dateFormat | <dateFormat> | <company's date format> | Specify the date format. |
clientId | < clientId > | all | Specify the client id for which timelogs needs to be fetched |
projectId | < projectId> | all | Specify the project Id based on which timelogs needs to be fetched |
billingStatus | <billable | non billable | non-billable | nonbillable| all | 0 | 1 | -1> | all | Specify the billable status based on which timelogs needs to be fetched |
approvalStatus | < approved | unapproved | all > | all | Specify the approvalStatus based on which timelogs needs to be fetched |
isCommentsCount | <true|false> | false | Fetches the comments count of the timer timelog |
sIndex | < sIndex> | 0 | Specify from which record the response should be fetched |
limit | < limit> | 200 | Specify the number of records to be fetched.Maximum value is 200 |
Error Codes & Messages:
Error Code | Error Message |
9000 | Permission denied |
9002 | No parameter specified |
9004 | Wrong date format given for parameter |
9006 | toDate should be after the fromDate |
9007 | Maximum of one month's data can only be fetched at a time |
Success Response Format
{
"response": {
"result": [{
"erecno": < employee_erecno >,
"employeeMailId": < emp_mailId >,
"employeeLastName": < emp_lname >,
"employeeFirstName": < emp_fname >,
"timerLog": < true|false >,
"timelogId": < timelog_id >,
"type": <0|1|2>,(0-hours Type ,1-Start&End Type,2-Timer type)
"workDate":< workdate_in_company_dateformat >,
"toTime": < to_time_in_mins >,
"isCurrentlyRunning":< true|false >,
"fromTime": < from_time_in_mins >,
"fromTimeInTimeFormat": < from_time_in_company settings time format >,
"toTimeInTimeFormat": < to_time_in_company settings time format >,
"hours": < hours in HH:MM format >,
"totaltime": < total_time_in_secs >,
"taskName": < work_item >,
"description": < timelog_description >,
"jobId": < job_id >,
"jobName": < job_name >,
"jobIsActive": < true|false >,
"jobIsCompleted": < 0|1 >,(NOTE: 0-in-progress,1-completed)
"clientId": < client_id >,
"projectName": < project_name >,
"projectId":< project_id >,
"billingStatus": < billable|non-billable >,
"isDeleteAllowed": < true|false >,
"isEditAllowed":< true|false >,
"isTimelogPushedToQBO": < true|false >,
"billedStatus": < billed|not billed >,
"approvalStatus": < notsubmitted | draft | pending | approved | rejected >,
"isTimelogPushedToZF":< true|false >,
"commentsCount": < commentcount >,(NOTE:key exists when isCommentsCount=true)
"add_ip":< added_ip_address>,
"mod_ip":< modified_ip_address >,
"isCurrentlyRunning":< true >,(NOTE:key exists if timelog's timer is running)
"timearr":[(NOTE:key exists only when the timelog is of timer type)
{
"fromTime": < from_time_in_secs >,
"geoLocation_in":< timer_started_location >,
"geoLocation_out": < timer_stopped_location >,
"toTime": < to_time_in_secs >,
"fromTimeInTimeFormat": < time_in_company settings timeformat >,
"toTimeInTimeFormat": < time_in_company settings timeformat >,
"timerId": < timer_id> ,
"mod_ip": < modified_ip_address >,
"isRunning":< true >(NOTE:key exists only when the timer set is running)
},....
],}
],...
"isNextAvailable": true, (NOTE:this key exists only if there is more data)
"message": "Data fetched successfully",
"uri": "/api/timetracker/gettimelogs",
}
Error Response Format
{
"response": {
"message": "Error in fetching data",
"uri": "/api/timetracker/gettimelogs",
"errors": [
{
"code": < error_code >,
"message": < error_message >
}],
"status": 1
}
}
Threshold Limit: 50 requests | Lock period: 5 minutes
Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.
Sample Request
Copiedhttps://people.zoho.com/people/api/timetracker/gettimelogs?user=charless@zohocorp.com&jobId=all&fromDate=2014-12-01&toDate=2014-12-31&billingStatus=all
Header
CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Sample Response
Copied{
"response": {
"result": [
{
"erecno": "492688000000135005",
"timerLog": true,
"employeeMailId": "c.spalding@zylker.com",
"isTimelogPushedToZF": false,
"jobColor": 1,
"employeeFirstName": "Christine",
"isDeleteAllowed": true,
"type": "2",
"workDate": "04-04-2019",
"fromTime": 666,
"billedStatus": "not billed",
"timearr": [
{
"timerId": "492688000000808292",
"fromTime": 54040,
"fromTimeInTimeFormat": "03:00PM",
"toTime": 64847,
"toTimeInTimeFormat": "06:00PM"
},
{
"timerId": "492688000000808280",
"fromTime": 39908,
"fromTimeInTimeFormat": "11:05AM",
"toTime": 47116,
"toTimeInTimeFormat": "01:05PM",
}
],
"jobIsActive": true,
"toTime": 667,
"jobName": "Development Phase",
"approvalStatus": "notsubmitted",
"hours": "05:00",
"db_workDate": "2019-04-04 00:00:00.0",
"jobIsCompleted": 0,
"jobBillableStatus": "0",
"isEditAllowed": true,
"billingStatus": "billable",
"jobId": "492688000000808246",
"isTimelogPushedToQBO": false,
"totaltime": 18015,
"employeeLastName": "Spalding",
"timelogId": "492688000000808276",
"taskName": "",
},
{
"erecno": "492688000000135005",
"timerLog": false,
"employeeMailId": "c.spalding@zylker.com",
"employeeFirstName": "Christine",
"isDeleteAllowed": true,
"type": "1",
"workDate": "09-04-2019",
"fromTime": 600,
"billedStatus": "not billed",
"fromTimeInTimeFormat": "10:00AM",
"jobIsActive": true,
"toTime": 1080,
"longitude": 80.0493048,
"jobName": "Development Phase",
"approvalStatus": "notsubmitted",
"hours": "08:00",
"db_workDate": "2019-04-09 00:00:00.0",
"jobIsCompleted": 0,
"jobBillableStatus": "0",
"isEditAllowed": true,
"billingStatus": "billable",
"jobId": "492688000000808246",
"isTimelogPushedToQBO": false,
"totaltime": 28800,
"employeeLastName": "Spalding",
"timelogId": "492688000000808270",
"toTimeInTimeFormat": "06:00PM",
}
],
"message": "Data fetched successfully",
"uri": "/api/timetracker/gettimelogs",
"status": 0
}
}
Copied<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/gettimelogs">
<status>0</status>
<message>Data fetched successfully</message>
<result>
<job>
<erecno>492688000000135005</erecno>
<timerLog>true</timerLog>
<employeeMailId>c.spalding@zylker.com</employeeMailId>
<employeeFirstName>Christine</employeeFirstName>
<isDeleteAllowed>true</isDeleteAllowed>
<type>2</type>
<workDate>04-04-2019</workDate>
<fromTime>666</fromTime>
<billedStatus>not billed</billedStatus>
<timearr>
[{"timerId":"492688000000808292",
"fromTime":54040,
"fromTimeInTimeFormat":"03:00PM",
"toTime":64847,
"toTimeInTimeFormat":"06:00PM"}]
</timearr>
<jobIsActive>true</jobIsActive>
<toTime>667</toTime>
<jobName>Development Phase</jobName>
<approvalStatus>notsubmitted</approvalStatus>
<hours>05:00</hours>
<db_workDate>2019-04-04 00:00:00.0</db_workDate>
<jobIsCompleted>0</jobIsCompleted>
<jobBillableStatus>0</jobBillableStatus>
<isEditAllowed>true</isEditAllowed>
<billingStatus>billable</billingStatus>
<jobId>492688000000808246</jobId>
<isTimelogPushedToQBO>false</isTimelogPushedToQBO>
<totaltime>18015</totaltime>
<employeeLastName>Spalding</employeeLastName>
<timelogId>492688000000808276</timelogId>
<taskName></taskName>
</job>
<job>
<erecno>492688000000135005</erecno>
<timerLog>false</timerLog>
<employeeMailId>c.spalding@zylker.com</employeeMailId>
<isTimelogPushedToZF>false</isTimelogPushedToZF>
<employeeFirstName>Sridhar</employeeFirstName>
<isDeleteAllowed>true</isDeleteAllowed>
<type>1</type>
<workDate>09-04-2019</workDate>
<fromTime>600</fromTime>
<billedStatus>not billed</billedStatus>
<fromTimeInTimeFormat>10:00AM</fromTimeInTimeFormat>
<jobIsActive>true</jobIsActive>
<toTime>1080</toTime>
<jobName>Development Phase</jobName>
<approvalStatus>notsubmitted</approvalStatus>
<hours>08:00</hours>
<db_workDate>2019-04-09 00:00:00.0</db_workDate>
<jobIsCompleted>0</jobIsCompleted>
<jobBillableStatus>0</jobBillableStatus>
<isEditAllowed>true</isEditAllowed>
<billingStatus>billable</billingStatus>
<jobId>492688000000808246</jobId>
<isTimelogPushedToQBO>false</isTimelogPushedToQBO>
<totaltime>28800</totaltime>
<employeeLastName>Spalding</employeeLastName>
<timelogId>492688000000808270</timelogId>
<toTimeInTimeFormat>06:00PM</toTimeInTimeFormat>
</job>
</result>
</response>