Add Job Schedule API

This API is used to add new job schedule.

Request URL:

https://people.zoho.com/api/timetracker/addJobSchedule?jobId=<jobId>&date=<date>&fromtime=<fromtime>&totime=<totime>&assignedTo=<assignedTo>&isPublish=<isPublish>

Header:

Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Scope:

ZOHOPEOPLE.timetracker.ALL
OR
ZOHOPEOPLE.timetracker.CREATE 

Possible Operation Types:

ALL - Complete access to data
CREATE - Only to add data

Request parameter:

ParameterValues AllowedDefault ValueDescription
*jobId<Job Id><Mandatory>Specify the Job Id
*date<date in yyyy-MM-dd/company date format><Mandatory>Specify the date when the job schedule needs to be added
*fromtime<fromtime in hh:mm a or HH:mm format><Mandatory>Specify the from time of the job schedule
*totime<totime in hh:mm a or HH:mm format><Mandatory>Specify the to time of job schedule
description<text> Specify the description of the job schedule
isPublish<true|false>falseSpecify if the job schedule needs to be published
assignedTo<ERECNO | Email-ID | Employee-ID><current user>Specify the user for whom the job schedule needs to be added
isRepeat<true|false>falseSpecify if the job schedule needs to be repeated
repeatInterval<1|2|3|4|5|6|7|8|9|10|11|12><Mandatory if isRepeat is true>Specify the interval for which the job schedule needs to be repeated
repeatType<daily|weekly|monthly><Mandatory if isRepeat is true>Specify how often the job schedule should be repeated based on the repeat interval
repeatUntil<date in yyyy -MM-dd/company date format><Mandatory if isRepeat is true>Specify the date until when the job schedule needs to be repeated
skipMaxLogHrsValidation<true|false>falseThis key will be considered only if maximum log hours restriction is enabled in the settings. Specify true if the scheduled hours can exceed the maximum log hours configured in the settings

Error Codes and Messages :

Error CodeError Message
9000Permission denied
9002No <parameter_name> parameter specified
9004Wrong value given for <parameter_name> parameter
9012You cannot add/edit/publish/delete schedule of past dates.
9013This action cannot be completed as it overlaps with another schedule.
9014This action cannot be completed as it exceeds the maximum log hours allowed for this user.
9015This action cannot be completed as the user is not assigned to the job.

Success Response Format

{
    "response": {
        "result": [
            {
                "jobScheduleId": < added job schedule Id>

            }
        ],
        "message": "Data added successfully",
        "uri": "/api/timetracker/addJobSchedule",
        "status": 0
    }
}

Error Response Format

{
    "response": {
        "message": Error in adding data,
        "uri": "/api/timetracker/addJobSchedule",
        "errors": [
            {
                "code": <Error Code>,
                "message": <Error Message>
            }
        ],
        "status": 1
    }
}

 Threshold Limit:  20 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/api/timetracker/addJobSchedule?jobId=111793034000627901&description= completeTestingfirst&isPublish=true&date=2019-08-01&fromtime=06:21&totime=07:32

Header

CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Sample Response

Copied{
    "response": {
        "result": [
            {
                "jobScheduleId": "28000000202047"
            }
        ],
        "message": "Data added successfully",
        "uri": "/api/timetracker/addJobSchedule",
        "status": 0
    }
}
Copied<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/addJobSchedule">
    <status>0</status>
    <message>Data added successfully</message>
    <result>
            <jobScheduleId>28000000202047</jobScheduleId>
    </result>        
</response>