Customize Leave Balance API

To update the leave balance of leave types for a particular employee

Request URL:

https://people.zoho.com/api/v2/leavetracker/settings/customize-balance/<erecno>

Header:

Authorization:Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf

Scope:

ZOHOPEOPLE.leave.CREATE

Request Method:

POST

Request Parameters:

Paramter NameValues AllowedDefault ValueDescription
balanceDataJSONObjecttemplate - balanceDataLeave balance details to be updated
dataFormatStringOrganization Date FormatDate Format to be used for Date in balanceData

Balance Data Template:

{
   "<leavetype-id>": {
       "date": "String",
       "newBalance": "double",
       "reason": "String"
   },
   "<leavetype-id>": {
       "date": "String",
       "newBalance": "double",
       "reason": "String"
   }
   ...
}

 

Error Codes and Message:

CodeMessage
9002Permission denied to access this API. Only Admin can access this API
7055Ensure date is in '*******' format for the parameter 'date'
9001Employee ID does not exist
9002Permission denied to access this API. Only Admin can access this API
9001Update the Date of Joining for this employee to display their leave information and enable them to perform leave related actions.
7055Ensure date is in 'dd-MMM-yyyy' format for the parameter 'date'
9001Provide valid data for parameter 'balanceData'
9001Leave type - ************ does not exist
9001Leave type IDs ************, ************ do not exist
9001Leave type - ************ is not effective on the specified date
9001Leave type - ************ is not applicable for this employee
  

Threshold Limit: 30 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:

Copied https://people.zoho.com/api/v2/leavetracker/settings/customize-balance/100002000000312

Sample Response:

Copied{
    "message": "Balance customized successfully !"
}