Add Leave API
Add leave records using Add Leave API
Request URL:
https://people.zoho.com/people/api/forms/<inputType>/<formLinkName>/insertRecord?inputData=<inputData>
Header
Authorization:Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf
Request Parameters
formLinkName | Form Lable name. To get formLinkName, refer appendix |
inputType | json |
JSON input: {LabelName:'value',LabelName1:'value1',LabelName2:'value2'} |
Note:
- 0.25 denotes quarter day and 0.5 denotes half a day.
- Time should be mentioned in the format - hh:mm (Eg: 02:00 - which denotes 2 hours of leave for the day)
Threshold Limit: 300 requests | Lock period: 5 minutes
Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.
JSON Request (Day-Based)
Copiedhttps://people.zoho.com/people/api/forms/json/leave/insertRecord?inputData={'Employee_ID':'3000000020481','Leavetype':'3000000046003','From':07-Jan-2021,'To':07-Jan-2021,'days':{'07-Jan-2020':{'LeaveCount':0.5, 'Session':2}}}
Header
CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Response
Copied{"response":{"result":{"pkId":"3000000248001","message":"Successfully Added"},"message":"Data added successfully","uri":"/api/forms/json/leave/insertRecord","status":0}}
JSON Request (Hour-Based)
Copiedhttps://people.zoho.com/people/api/forms/json/leave/insertRecord?inputData={‘Employee_ID':'3000000020481','Leavetype':'3000000046003','From’:07-Jan-2021,'To’:’07-Jan-2021, 'days':{’07-Jan-2021' : {"LeaveCount":"01:00", 'StartTime' : "17:00", 'EndTime' : "18:00"}}
Response
Copied{"response":{"result":{"pkId":"3000000248001","message":"Successfully Added"},"message":"Data added successfully","uri":"/api/forms/json/leave/insertRecord","status":0}}