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: 100 requests | Lock period: 5 minutes
Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.