Jobs API

Purpose

This API is used to retrieve the list of jobs, job details, to add, modify, delete jobs, to check add job permission and to change job status.

Get jobs API

This API is used to get the list of jobs.

Request URL:

http://people.zoho.com/people/api/timetracker/getjobs?authtoken=<authtoken>&assignedTo=<assignedTo>&assignedBy= <assignedBy>&projectId=<projectId >&dateFormat=<dateFormat>&jobStatus =<jobStatus >

Request parameter:

authtokenSpecify the authentication token
assignedToSpecify all or ERECNO or Email-ID or Employee-ID
assignedBySpecify all or ERECNO or Email-ID or Employee-ID
jobStatusSpecify all or inprogress or completed
projectIdSpecify the projectId
dateFormatSpecify the date format

Example URL:

http://people.zoho.com/people/api/timetracker/getjobs?authtoken=<authtoken>&assignedTo=1&assignedBy=1&jobStatus=all

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri=”/people/api/timetracker/getjobs">
<status>0</status>
<message>Data Fetched Successfully</message>
<result>
<job>
<jobId>233118000000126031</jobId>
<jobName>Web Designing</jobName>
<assignedBy>Charles Stones</assignedBy>
<hours>22:30<hours >
<description>The design is to be done with CSS3</description >
<fromDate>13-MAR-2014</fromDate>
<toDate>17-MAR-2014</toDate>
<projectId>41104000000768001</projectId>
<projectName>Wray Group</projectName>
<ratePerHour>13</ratePerHour>
<assignees>
<assignee>
<name>Patricia Boyle</name>
<hours>12:30</hours>
</assignee>
<assignee>
<name>Jasmine Frank</name>
<hours>10:00</hours>
</assignee>
</assignees>
</job>
<job>
<jobId>233118000000126047</jobId>
<jobName>Product Video</jobName>
<assignedBy>Charles Stones</assignedBy>
<hours>18:00<hours >
<description>Should include latest facilities</description >
<fromDate>19-MAY-2014</fromDate>
<toDate>22-MAY-2014</toDate>
<projectId>270127000000042883</projectId>
<projectName>AM Associates</projectName>
<ratePerHour>13</ratePerHour>
<assignees>
<assignee>
<name>Charles Stones</name>
<hours>6:00</hours>
</assignee>
<assignee>
<name>Jasmine Frank</name>
<hours>6:00</hours>
</assignee>
<assignee>
<name>Eduardo Vargas</name>
<hours>6:00</hours>
</assignee>
</assignees>
</job>
</result>
</response>

JSON response:

{"response":{ uri:"/people/api/timetracker/getjobs", "status":0, "message":"Data Fetched Successfully", "result":{ "job":[ { "jobId":"233118000000126031", "jobName":"Web Designing", "assignedBy":"Charles Stones", "hours":"22:30", "description":"The design is to be done with CSS3", "fromDate":"13-MAR-2014", "toDate":"17-MAR-2014", "projectId":"41104000000768001", "projectName":"Wray Group", "ratePerHour":13, "assignees":{[ {"name":"Patricia Boyle","hours":"12:30"}, {"name":"Jasmine Frank","hours":"10:00"} ]} }, { "jobId":"233118000000126047", "jobName":"Product Video", "assignedBy":"Charles Stones", "hours":"18:00", "description":"Should include latest facilities", "fromDate":"19-MAY-2014", "toDate":"22-MAY-2014", "projectId":"270127000000042883", "projectName":"AM Associates", "ratePerHour":13, "assignees":{[ {"name":"Charles Stones","hours":"6:00"}, {"name":"Jasmine Frank","hours":"6:00"}, {"name":"Eduardo Vargas","hours":"6:00"} ]} } ] } } }

Get job details API

This API is used to get the list of jobs details.

Request URL:

http://people.zoho.com/people/api/timetracker/getjobdetails?authtoken=<authtoken>&jobId=<jobId>&dateFormat=<dateFormat>

Request parameter:

authtokenSpecify the authentication token
jobIdSpecify the job Id
dateFormatSpecify the date format

Example URL:

http://people.zoho.com/people/api/timetracker/getjobdetails?authtoken=48a1a3be24d98d11d53778200a4758c2&jobId=177402000000814321

XML Response:

<response uri="/api/timetracker/getjobdetails">
<status>0</status>
<message>Data Fetched Successfully</message>
<result>
<job>
<totalhours>04:00</totalhours>
<fromDate>2015-02-11</fromDate>
<jobId>177402000000814321</jobId>
<jobStatus>In-Progess</jobStatus>
<hours>49:00</hours>
<owner>177402000000034203</owner>
<assignedBy>Karan</assignedBy>
<toDate>2015-02-11</toDate>
<jobName>Documentation</jobName>
<ratePerHour>0.0</ratePerHour>
<assignees>
<assignee>
<erecno>177402000000034203</erecno>
<hours>00:00</hours>
<name>Karan</name>
</assignee>
<assignee>
<erecno>177402000000037563</erecno>
<hours>13:00</hours>
<name>Johny</name>
</assignee>
<assignee>
<erecno>177402000000663330</erecno>
<hours>12:00</hours>
<name>Mackay</name>
</assignee>
<assignee>
<erecno>177402000000663414</erecno>
<hours>12:00</hours>
<name>Sturgess</name>
</assignee>
</assignees>
</job>
</result>
</response>

JSON Response:

{ "response": { "message": "Data Fetched Successfully", "result": [ { "totalhours": "04:00", "fromDate": "2015-02-11", "jobId": "177402000000814321", "assignees": [ { "erecno": "177402000000034203", "hours": "00:00", "name": "Karan" }, { "erecno": "177402000000037563", "hours": "13:00", "name": "Johny" }, { "erecno": "177402000000663330", "hours": "12:00", "name": "Mackay" }, { "erecno": "177402000000663414", "hours": "12:00", "name": "Sturgess" } ], "jobStatus": "In-Progess", "hours": "49:00", "owner": "177402000000034203", "assignedBy": "Karan", "toDate": "2015-02-11", "jobName": "Documentation", "ratePerHour": 0 } ], "status": 0, "uri": "/api/timetracker/getjobdetails" } }

Add job permission API

This API is used to add job permission for any particular job.

Request URL:

https://people.zoho.com/api/timetracker/addjobpermissioncheck?authtoken=<token>

Request parameter:

authtokenSpecify the authentication token

Example URL:

https://people.zoho.com/api/timetracker/addjobpermissioncheck?authtoken=48a1a3be24d98d11d53778200a4758c2

XML Response:

<response uri="/api/timetracker/addjobpermissioncheck">
<status>0</status>
<message>Add Job permission fetched successfully</message>
<result>
<isAllowed>true</isAllowed>
</result>
</response>

JSON Response:

{ "response": { "message": "Add Job permission fetched successfully", "result": { "isAllowed": true }, "status": 0, "uri": "/api/timetracker/addjobpermissioncheck" } }

Add job API (deprecated - Usethis)

This API is used to add and assign job for the employees.

Request URL:

https://people.zoho.com/api/timetracker/addjob?authtoken=<token>&jobName=<jobName>&assignedTo=<assignedTo>&assignees=<assignees>&dateFormat=<dateFormat>&hours=<hours>&description=<description>&fromDate=<fromDate>&toDate=<toDate>&projectId=<projectId>&ratePerHour=<ratePerHour>

Request parameter:

authtokenSpecify the authentication token
jobNameSpecify the job name
assignedToSpecify ERECNO or Email-ID or Employee-ID for a single employee
assignees[{'assignedTo':< ERECNO | Email-ID | Employee-ID >,'hours':'value'} ..... n for the multiple employees]
dateFormatSpecify the date format
hoursSpecify the hours
descriptionSpecify the description
fromDateSpecify the from date
toDateSpecify the to date
projectIdSpecify the project Id
ratePerHourSpecify the rate per hour

Example URL:

https://people.zoho.com/api/timetracker/addjob?authtoken=48552851f39b2455991e8eeab1a67d80&jobName=API job&assignedTo=293141000000061007&hours=2&description=desc&fromDate=2015-05-10&toDate=2015-05-10&projectId=293141000000065149&ratePerHour=2

XML Response:

<response uri="/api/timetracker/addjob">
<status>0</status>
<message>Job added Successfully</message>
<result>
<jobId>293141000000144015</jobId>
</result>
</response>

JSON Response:

{ "response": { "message": "Job added Successfully", "result": [ { "jobId": "293141000000144027" } ], "status": 0, "uri": "/api/timetracker/addjob" } }

Form based API for Add Job

This API is used to add a job

Request URL:

https://people.zoho.com/people/api/forms/<inputType>/<formLinkName>/insertRecord?authtoken=<token>&inputData=<inputData>

Request Parameters

authtokenSpecify the authentication token
formLinkNameTo get formLinkName, use the Fetch Forms API.
inputTypexml or json
inputDataXML input: <Request><Record><field name="Labelname">value</field><field name="LabelName1">value1</field><field name="Labelname2">value2</field></Record></Request>
JSON input: {LabelName:'value',LabelName1:'value1',LabelName2:'value2'}

Example URL:

JSON Request

https://people.zoho.com/people/api/forms/json/P_TimesheetJob/insertRecord?authtoken=c05097bb5311b6eadfd5cbbbd66d9ef6&inputData={"Job_Name":"Components Design","StartDate":"24-02-2019",
"EndDate":"01-02-2019","Project":"9000000316367","Assignees":"9000000013255;
9000000019535", "AssigneeHours":"20;20","AssigneeRate":"100;100",
"departmentIds":"9000000013669;9000000019671"}

XML Request

https://people.zoho.com/people/api/forms/xml/P_TimesheetJob/insertRecord?authtoken=c05097bb5311b6eadfd5cbbbd66d9ef6&inputData=<Request><Record><field name="Job_Name">Components Design</field><field name="StartDate">24-02-2019</field><field name="EndDate">01-02-2019</field><field name="Project">9000000316367</field><field name="Assignees">9000000013255;9000000019535</field><field name="AssigneeHours">20;20</field><field name="AssigneeRate">100;100</field><field name="departmentIds">9000000013669;9000000019671</field></Record></Request>

Example Response:

JSON Response

{
"response": {
"result": {
"pkId": "9000000316345",
"message": "Successfully Added"
},
"message": "Data added successfully",
"uri": "/api/forms/json/P_TimesheetJob/insertRecord",
"status": 0
}
}

XML Response

<?xml version=""1.0"" encoding=""UTF-8""?> <response uri=""/api/forms/xml/P_TimesheetJob/insertRecord""> <status>0</status> <message>Data added successfully</message> <result> <message>Successfully added</message> </result> </response>

 

Note:

  • Please refer https://people.zoho.com/people/#admin/api/reference or Use the Fetch Component API to get the list of form components.
  • To assign job to all users mention as 'All' for 'Assignees' in the inputData.

Modify job API (deprecated - Usethis)

This API is used to modify any job.

Request URL:

https://people.zoho.com/api/timetracker/modifyjob?authtoken=<token>&jobId=<jobId>&assignedTo=<assignedTo>&hours=<hours>&description=<description>&fromDate=<fromDate>&toDate=<toDate>&projectId=<projectId>&ratePerHour=<ratePerHour>

Request parameter:

authtokenSpecify the authentication token
jobIdSpecify the job Id
assignedToSpecify ERECNO or Email-ID or Employee-ID for a single employee
hoursSpecify the hours
descriptionSpecify the description
fromDateSpecify the from date
toDateSpecify the to date
projectIdSpecify the project Id
ratePerHourSpecify the rate per hour

Example URL:

https://people.zoho.com/api/timetracker/modifyjob?authtoken=48552851f39b2455991e8eeab1a67d80&jobId=177402000000814321 &assignedTo=293141000000061007&hours=2&description=desc&fromDate=2015-05-10&toDate=2015-05-10&projectId=293141000000065149&ratePerHour=2

XML Response:

<response uri="/api/timetracker/modifyjob">
<status>0</status>
<message>Job modified Successfully</message>
<result>
<jobId>293141000000144015</jobId>
</result>
</response>

JSON Response:

{ "response": { "message": "Job modified Successfully", "result": [ { "jobId": "293141000000144027" } ], "status": 0, "uri": "/api/timetracker/modifyjob" } }

 

Form based API for Modify Job

This API is used to modify any job.

Request URL:

https://people.zoho.com/people/api/forms/<inputType>/<formLinkName>/updateRecord?authtoken=<token>&inputData=<inputData>&recordId=<recordId>

authtokenSpecify the authentication token
formLinkNameTo get formLinkName, use the Fetch Forms API.
inputTypexml or json
recordIdSpecifies the user record ID of the record being edited
inputDataXML input: <Request><Record><field name="Labelname">value</field><field name="LabelName1">value1</field><field name="Labelname2">value2</field></Record></Request>
JSON input: {LabelName:'value',LabelName1:'value1',LabelName2:'value2'}
Example URL:

JSON Request:

https://people.zoho.com/people/api/forms/json/P_TimesheetJob/updateRecord?authtoken=c05097bb5311b6eadfd5cbbbd66d9ef6&inputData={"Job_Name":"Components Design","StartDate":"20-02-2019",
"EndDate":"22-02-2019","Project":"9000000314433","Assignees":"9000000013255;9000000019535",
"AssigneeHours":"20;20","AssigneeRate":"100;100",
"departmentIds":"9000000013669;9000000019671"}&recordId=9000000316015

XML Request:

https://people.zoho.com/people/api/forms/xml/P_TimesheetJob/updateRecord?authtoken=c05097bb5311b6eadfd5cbbbd66d9ef6&inputData=<Request><Record><field name="Job_Name">Components Design</field><field name="StartDate">20-02-2019</field><field name="EndDate">22-02-2019</field><field name="Project">9000000314433</field><field name="Assignees">9000000013255;9000000019535</field><field name="AssigneeHours">20;20</field><field name="AssigneeRate">100;100</field><field name="departmentIds">9000000013669;9000000019671</field></Record></Request>&recordId=9000000316015

Example Response:

JSON Response:

{
"response": {
"result": {
"pkId": "9000000316015",
"message": "Successfully Updated"
},
"message": "Data updated successfully",
"uri": "/api/forms/json/P_TimesheetJob/updateRecord",
"status": 0
}
}

XML Response:

<?xml version=""1.0"" encoding=""UTF-8""?>
<response uri=""/api/forms/xml/P_TimesheetJob/updateRecord"">
<status>0</status>
<message>Data updated successfully</message>
<result>
<message>Successfully Updated</message>
</result>
</response>

 

Change job status API

This API is used to change the job status.

Request URL:

https://people.zoho.com/people/api/timetracker/modifyjobstatus?authtoken=<token>&jobId=<jobId>&jobStatus=<jobStatus>

Request parameter:

authtokenSpecify the authentication token
jobIdSpecify the job Id
jobStatusSpecify the job status as in-progress or completed

Example URL:

https://people.zoho.com/api/timetracker/modifyjobstatus?authtoken=48552851f39b2455991e8eeab1a67d80&jobId=177402000000814321 &jobStatus=completed

XML Response:

<response uri="/api/timetracker/modifyjobstatus">
<status>0</status>
<message>Job status modified Successfully</message>
<result>
<jobId>293141000000144015</jobId>
</result>
</response>

JSON Response:

{ "response": { "message": "Job status modified Successfully", "result": [ { "jobId": "293141000000144027" } ], "status": 0, "uri": "/api/timetracker/modifyjobstatus" } }

Delete job API

This API is used to delete any job.

Request URL:

https://people.zoho.com/people/api/timetracker/deletejob?authtoken=<token>&jobId=<jobId>

Request parameter:

authtokenSpecify the authentication token
jobIdSpecify the job Id (seperated by commas)

Example URL:

https://people.zoho.com/api/timetracker/deletejob?authtoken=48552851f39b2455991e8eeab1a67d80&jobId=177402000000814321

XML Response:

<response uri="/api/timetracker/deletejob">
<status>0</status>
<message>Job deleted Successfully</message>
<result>
<jobId>293141000000144015</jobId>
</result>
</response>

JSON Response:

{ "response": { "message": "Job deleted Successfully", "result": [ { "jobId": "293141000000144027" } ], "status": 0, "uri": "/api/timetracker/deletejob" } }