Time logs API

Purpose

This API is used to get time logs, to add, to modify and to delete the time logs.

Get time logs API

This API is used to get the list of time logs.

Request URL:

http://people.zoho.com/people/api/timetracker/gettimelogs?authtoken=<authtoken>&fromDate=<fromDate>&toDate= <toDate>&billingStatus=<billingStatus>&jobId=<jobId>&user =<user>&dateFormat=<dateFormat>

Request parameter:

authtokenSpecify the authentication token
userSpecify the ERECNO or Email-ID or Employee-ID
fromDateSpecify the from date
toDateSpecify the to date
billingStatusSpecify the billing status as billable or non-billable or all for all both billing status
jobIdSpecify the job Id or all for all jobs
dateFormatSpecify the date format

Example URL:

http://people.zoho.com/people/api/timetracker/gettimelogs?authtoken=ffb014e4d3af62aa74c7db66eff557fc&user=charless.stones%2Bsguru1%40zohocorp.com&jobId=0&fromDate=2014-12-01&toDate=2014-12-31&billingStatus=all

XML response:

<response uri="/api/timetracker/gettimelogs">
<status>0</status>
<message>Data fetched successfully</message>
<result>
<timeLog>
<workDate>2014-12-22</workDate>
<jobId>281496000000213662</jobId>
<erecno>281496000000054071</erecno>
<hours>20:00</hours>
<fromTime>0</fromTime>
<type>0</type>
<jobName>test2</jobName>
<taskName />
<toTime>0</toTime>
<timelogId>281496000000232570</timelogId>
<jobIsCompleted>0</jobIsCompleted>
<description>asdf</description>
<jobIsActive>1</jobIsActive>
<totaltime>72000</totaltime>
<billingStatus>non-billable</billingStatus>
<timerLog>false</timerLog>
</timeLog>
<timeLog>
<workDate>2014-12-23</workDate>
<jobId>281496000000242015</jobId>
<erecno>281496000000054071</erecno>
<hours>20:00</hours>
<fromTime>0</fromTime>
<type>0</type>
<jobName>charless job</jobName>
<taskName>asfd</taskName>
<toTime>0</toTime>
<timelogId>281496000000242021</timelogId>
<jobIsCompleted>0</jobIsCompleted>
<description>asf</description>
<jobIsActive>1</jobIsActive>
<totaltime>72000</totaltime>
<billingStatus>billable</billingStatus>
<timerLog>false</timerLog>
</timeLog>
</result>
</response>

JSON response:

{ "response": { "message": "Data fetched successfully", "result": [ { "workDate": "2014-12-22", "jobId": "281496000000213662", "erecno": "281496000000054071", "hours": "20:00", "fromTime": 0, "type": "0", "jobName": "test2", "taskName": "", "toTime": 0, "timelogId": "281496000000232570", "jobIsCompleted": 0, "description": "asdf", "jobIsActive": 1, "totaltime": 72000, "billingStatus": "non-billable", "timerLog": false }, { "workDate": "2014-12-23", "jobId": "281496000000242015", "erecno": "281496000000054071", "hours": "20:00", "fromTime": 0, "type": "0", "jobName": "charless job", "taskName": "asfd", "toTime": 0, "timelogId": "281496000000242021", "jobIsCompleted": 0, "description": "asf", "jobIsActive": 1, "totaltime": 72000, "billingStatus": "billable", "timerLog": false } ], "status": 0, "uri": "/api/timetracker/gettimelogs" } }

Add time log API

This API is used to add the time logs.

Request URL:

http://people.zoho.com/people/api/timetracker/addtimelog?authtoken=<authtoken>&user=<user>&workDate= <workDate>&jobId =<jobId>&hours =<hours>&fromTime=<fromTime>&toTime=<toTime>&workItem=<workItem>&billingStatus =<billingStatus>&description =<description>

Request parameter:

authtokenSpecify the authentication token
userSpecify the ERECNO or Email-ID or Employee-ID
workDateSpecify the work date
billingStatusSpecify the billing status
jobIdSpecify the job Id
hoursSpecify the hours
fromTimeSpecify the from time
toTimeSpecify the to time
descriptionSpecify the description
workItemSpecify the work item

Example URL:

http://people.zoho.com/people/api/timetracker/addtimelog?authtoken=28ac426a249678c8867a0d93bb373912&user=charless.stones%2Bsguru1%40zohocorp.com&jobName=Testigapi&workDate=2015-01-05&billingStatus=Billable&hours=10

XML response:

<response uri="/api/timetracker/addtimelog">
<status>0</status>
<message>Timelog entry added Successfully</message>
<result>
<timeLogId>281496000000484013</timeLogId>
</result>
</response>

JSON response:

{ "response": { "message": "Timelog entry added Successfully", "result": [ { "timeLogId": "281496000000484009" } ], "status": 0, "uri": "/api/timetracker/addtimelog" } }

Modify time log API

This API is used to edit the time logs.

Request URL:

http://people.zoho.com/people/api/timetracker/edittimelog?authtoken=<authtoken>&timeLogId=<timeLogId>&user= <user>&workDate =<workDate>&jobId =<jobId>&hours=<hours>&fromTime=<fromTime>&toTime=<toTime>&billingStatus =<billingStatus>&description =<description>&workItem=<workItem>

Request parameter:

authtokenSpecify the authentication token
userSpecify the ERECNO or Email-ID or Employee-ID
timeLogIdSpecify the timeLog Id
workItemSpecify the work item
workDateSpecify the work date
billingStatusSpecify the billing status
jobIdSpecify the job Id
hoursSpecify the hours
fromTimeSpecify the from time
toTimeSpecify the to time
descriptionSpecify the description

Example URL:

http://people.zoho.com/people/api/timetracker/edittimelog?authtoken=28ac426a249678c8867a0d93bb373912&timeLogId=177402000000814321&workItem=web designing&user=charless.stones%2Bsguru1%40zohocorp.com&jobName=Testigapi&workDate=2015-01-05&billingStatus=Billable&hours=10

XML response:

<response uri="/api/timetracker/edittimelog">
<status>0</status>
<message>Timelog entry edited Successfully</message>
<result>
<timeLogId>281496000000484013</timeLogId>
</result>
</response>

JSON response:

{ "response": { "message": "Timelog entry edited Successfully", "result": [ { "timeLogId": "281496000000484009" } ], "status": 0, "uri": "/api/timetracker/edittimelog" } }

Delete time logs API

This API is used to delete the time logs.

Request URL:

http://people.zoho.com/people/api/timetracker/deletetimelog?authtoken=<authtoken>&timeLogId=<timeLogId>

Request parameter:

authtokenSpecify the authentication token
timeLogIdSpecify the timeLogIds seperated by commas

Example URL:

http://people.zoho.com/people/api/timetracker/deletetimelog?authtoken=28ac426a249678c8867a0d93bb373912&timeLogId=177402000000814321

XML response:

<response uri="/api/timetracker/deletetimelog">
<status>0</status>
<message>Timelog entry deleted Successfully</message>
<result>
<timeLogId>281496000000484013</timeLogId>
</result>
</response>

JSON response:

{ "response": { "message": "Timelog entry deleted Successfully", "result": [ { "timeLogId": "281496000000484009" } ], "status": 0, "uri": "/api/timetracker/deletetimelog" } }