Sample JSON response
[ { "id": 86, "leaveTypeName": "Casual Leaves", "paid": true, "remainingBalanceInDays": 10.5, "availableMaxCarryOverInDays": 5 }, { "id": 89, "leaveTypeName": "Comp Offs", "paid": true, "remainingBalanceInDays": 7.7, "availableMaxCarryOverInDays": 0 }, { "id": 87, "leaveTypeName": "Leave without pay", "paid": false, "remainingBalanceInDays": 23.1, "availableMaxCarryOverInDays": 0 }, { "id": 88, "leaveTypeName": "Sick Leaves", "paid": true, "remainingBalanceInDays": 11.5, "availableMaxCarryOverInDays": 0 }, { "id": 90, "leaveTypeName": "Work from home", "paid": true, "remainingBalanceInDays": 9.2, "availableMaxCarryOverInDays": 0 } ]
Response parameters
Parent | Parameter | Type | Description | Possible values |
---|---|---|---|---|
id | Number | Leave type ID | 89, 67, 45, 43, etc. | |
leaveTypeName | String | Name of leave type | Sick leave, Comp off | |
paid | String | Based on the leave type settings, this parameter is true or false |
| |
remainingBalanceInDays | Number | Number of leaves remaining for given leave type | 10, 9.5, etc. | |
availableMaxCarryOverInDays | Number | Number of days that can be carried forward for the given leave type | 10, 5, etc. |
Possible error cases and messages
Error Scenarios | Error message | Http Status code |
---|---|---|
Invalid account id accountId user details validation | Please enter a valid account ID | NOT FOUND (404) |
invalid API token | The API token in the request is invalid. Please use a different one | UNAUTHORIZED(401) |
Leave feature disabled | This feature is disabled or you don't have permission to view it. | BAD REQUEST (400) |
loggedIn user permissions validations | You do not have permission to view Leave types for this user. | FORBIDDEN (403) |
accountId user Inactive or Deleted | The user does not have access to UpRaise. | NOT FOUND (404) |