Timesheet API

Purpose

This API is used to get timesheet, to create, to modify and to delete the timesheet.

Get timesheets API

This API is used to get the list of timesheets.

Request URL:

https://people.zoho.com/people/api/timetracker/gettimesheet?authtoken=<authtoken>&user=<user>&approvalStatus=<approvalStatus>&employeeStatus=<employeeStatus>

Request parameter:

authtokenSpecify the authentication token
userSpecify the ERECNO or Email-ID or Employee-ID
approvalStatusSpecify the approval status: all or draft or pending or approved or rejected
employeeStatusSpecify the employee status:usersandnonusers or users or nonusers or logindisabled

Example URL:

people.zoho.com/people/api/timetracker/gettimesheet?authtoken=48552851f39b2455991e8eeab1a67d80&user=1&approvalStatus=pending

XML response:

<response uri="/api/timetracker/gettimesheet">
<status>0</status>
<message>Data fetched successfully</message>
<result>
<timesheet>
<erecno>293141000000061007</erecno>
<status>Pending</status>
<timesheetName>Timesheet</timesheetName>
<approvedBillableHours>0</approvedBillableHours>
<toDate>2015-05-14</toDate>
<employeeName>Guru F Guru L</employeeName>
<currency>USD</currency>
<ratePerHour>5.0</ratePerHour>
<approvedNonBillableHours>0</approvedNonBillableHours>
<approvedTotalAmount>0.0</approvedTotalAmount>
<fromDate>2015-05-14</fromDate>
<nonbillableHours>720</nonbillableHours>
<description>API input11</description>
<approvedTotalHours>0</approvedTotalHours>
<approvedRatePerHour>0.0</approvedRatePerHour>
<owner>293141000000061007</owner>
<totalAmount>210.0</totalAmount>
<totalHours>3240</totalHours>
<billableHours>2520</billableHours>
</timesheet>
<timesheet>
<erecno>293141000000061007</erecno>
<status>Pending</status>
<timesheetName>Timesheet_1</timesheetName>
<approvedBillableHours>0</approvedBillableHours>
<toDate>2015-05-14</toDate>
<employeeName>Guru F Guru L</employeeName>
<currency>USD</currency>
<ratePerHour>5.0</ratePerHour>
<approvedNonBillableHours>0</approvedNonBillableHours>
<approvedTotalAmount>0.0</approvedTotalAmount>
<fromDate>2015-05-14</fromDate>
<nonbillableHours>0</nonbillableHours>
<description>Time sheet description</description>
<approvedTotalHours>0</approvedTotalHours>
<approvedRatePerHour>0.0</approvedRatePerHour>
<owner>293141000000061007</owner>
<totalAmount>0.0</totalAmount>
<totalHours>0</totalHours>
<billableHours>0</billableHours>
</timesheet>
<timesheet>
<erecno>293141000000061007</erecno>
<status>Pending</status>
<timesheetName>Timesheet_1</timesheetName>
<approvedBillableHours>0</approvedBillableHours>
<toDate>2015-05-14</toDate>
<employeeName>Guru F Guru L</employeeName>
<currency>USD</currency>
<ratePerHour>5.0</ratePerHour>
<approvedNonBillableHours>0</approvedNonBillableHours>
<approvedTotalAmount>0.0</approvedTotalAmount>
<fromDate>2015-05-14</fromDate>
<nonbillableHours>0</nonbillableHours>
<description>Time sheet description</description>
<approvedTotalHours>0</approvedTotalHours>
<approvedRatePerHour>0.0</approvedRatePerHour>
<owner>293141000000061007</owner>
<totalAmount>0.0</totalAmount>
<totalHours>0</totalHours>
<billableHours>0</billableHours>
</timesheet>
<timesheet>
<erecno>293141000000061007</erecno>
<status>Pending</status>
<timesheetName>Timesheet_1</timesheetName>
<approvedBillableHours>0</approvedBillableHours>
<toDate>2015-05-14</toDate>
<employeeName>Guru F Guru L</employeeName>
<currency>USD</currency>
<ratePerHour>5.0</ratePerHour>
<approvedNonBillableHours>0</approvedNonBillableHours>
<approvedTotalAmount>0.0</approvedTotalAmount>
<fromDate>2015-05-14</fromDate>
<nonbillableHours>0</nonbillableHours>
<description>Time sheet description</description>
<approvedTotalHours>0</approvedTotalHours>
<approvedRatePerHour>0.0</approvedRatePerHour>
<owner>293141000000061007</owner>
<totalAmount>0.0</totalAmount>
<totalHours>0</totalHours>
<billableHours>0</billableHours>
</timesheet>
</result>
</response>

JSON response:

{ "response": { "message": "Data fetched successfully", "result": [ { "erecno": "293141000000061007", "status": "Pending", "timesheetName": "Timesheet", "approvedBillableHours": 0, "toDate": "2015-05-14", "employeeName": "Guru F Guru L", "currency": "USD", "ratePerHour": 5, "approvedNonBillableHours": 0, "approvedTotalAmount": 0, "fromDate": "2015-05-14", "nonbillableHours": 720, "description": "API input11", "approvedTotalHours": 0, "approvedRatePerHour": 0, "owner": "293141000000061007", "totalAmount": 210, "totalHours": 3240, "billableHours": 2520 }, { "erecno": "293141000000061007", "status": "Pending", "timesheetName": "Timesheet_1", "approvedBillableHours": 0, "toDate": "2015-05-14", "employeeName": "Guru F Guru L", "currency": "USD", "ratePerHour": 5, "approvedNonBillableHours": 0, "approvedTotalAmount": 0, "fromDate": "2015-05-14", "nonbillableHours": 0, "description": "Time sheet description", "approvedTotalHours": 0, "approvedRatePerHour": 0, "owner": "293141000000061007", "totalAmount": 0, "totalHours": 0, "billableHours": 0 }, { "erecno": "293141000000061007", "status": "Pending", "timesheetName": "Timesheet_1", "approvedBillableHours": 0, "toDate": "2015-05-14", "employeeName": "Guru F Guru L", "currency": "USD", "ratePerHour": 5, "approvedNonBillableHours": 0, "approvedTotalAmount": 0, "fromDate": "2015-05-14", "nonbillableHours": 0, "description": "Time sheet description", "approvedTotalHours": 0, "approvedRatePerHour": 0, "owner": "293141000000061007", "totalAmount": 0, "totalHours": 0, "billableHours": 0 }, { "erecno": "293141000000061007", "status": "Pending", "timesheetName": "Timesheet_1", "approvedBillableHours": 0, "toDate": "2015-05-14", "employeeName": "Guru F Guru L", "currency": "USD", "ratePerHour": 5, "approvedNonBillableHours": 0, "approvedTotalAmount": 0, "fromDate": "2015-05-14", "nonbillableHours": 0, "description": "Time sheet description", "approvedTotalHours": 0, "approvedRatePerHour": 0, "owner": "293141000000061007", "totalAmount": 0, "totalHours": 0, "billableHours": 0 } ], "status": 0, "uri": "/api/timetracker/gettimesheet" } }

Create timesheets API

This API is used to create the timesheets.

Request URL:

http://people.zoho.com/people/api/timetracker/createtimesheet?authtoken=<authtoken>&user=<user>&timesheetName=<timesheetName>&description=<description>&sendforApproval=<sendforApproval>&fromDate=<fromDate>&toDate=<toDate>&jobId=<jobId>&billingStatus=<billingStatus>

Request parameter:

authtokenSpecify the authentication token
userSpecify the ERECNO or Email-ID or Employee-ID
timesheetNameSpecify the timesheet name
descriptionSpecify the description
sendforApprovalSpecify true or false
fromDateSpecify the from date
toDateSpecify the to date
jobIdSpecify the job Id
billingStatusSpecify the billing status

Example URL:

http://people.zoho.com/people/api/timetracker/createtimesheet?authtoken=48552851f39b2455991e8eeab1a67d80&user=293141000000061007&timesheetName=Timesheet_1&description=Time sheet description&sendforApproval=true&fromDate=2015-05-14&toDate=2015-05-14&jobId=all&billingStatus=nonbillable

XML response:

<response uri="/api/timetracker/createtimesheet">
<status>0</status>
<message>Timesheet created successfully</message>
<result>
<timesheetId>293141000000146001</timesheetId>
</result>
</response>

JSON response:

{ "response": { "message": "Timesheet created successfully", "result": [ { "timesheetId": "293141000000146007" } ], "status": 0, "uri": "/api/timetracker/createtimesheet" } }

Modify timesheets API

This API is used to modify the timesheets.

Request URL:

http://people.zoho.com/people/api/timetracker/modifytimesheet?authtoken=<authtoken>&timesheetId=<timesheetId>&timesheetName=<timesheetName>&description=<description>&sendforApproval=<sendforApproval>

Request parameter:

authtokenSpecify the authentication token
timesheetIdSpecify the timesheet Id
timesheetNameSpecify the timesheet name
descriptionSpecify the description
sendforApprovalSpecify true or false

Example URL:

http://people.zoho.com/people/api/timetracker/modifytimesheet?authtoken=48552851f39b2455991e8eeab1a67d80&timesheetId=293141000000061007&timesheetName=Timesheet_1&description=Time sheet description&sendforApproval=true

XML response:

<response uri="/api/timetracker/modifytimesheet">
<status>0</status>
<message>Timesheet modified successfully</message>
<result>
<timesheetId>293141000000146001</timesheetId>
</result>
</response>

JSON response:

{ "response": { "message": "Timesheet modified successfully", "result": [ { "timesheetId": "293141000000146007" } ], "status": 0, "uri": "/api/timetracker/modifytimesheet" } }