Sample Request JSON
{ "requestFor": "6327fe4c61dbef2805bb9a62", "leaveType": { "id": 2539 }, "reason": "Due to ill health.", "fromDate": "2024-7-15", "toDate": "2024-7-17", "allFullDays": false, "leaveApplicationDates": [ { "leaveDate": "2024-7-15", "duration": "first half" }, { "leaveDate": "2024-7-16", "duration": "second half" }, { "leaveDate": "2024-7-17", "duration": "full day" } ], "visibility": 2, "teams": [ 917, 1277 ], "users": [ "63da09ac010d35637970cff8" ] }
Request parameters
Parent | Parameter | Type | Description | Possible values |
---|---|---|---|---|
requestFor | String | Add the account id of the user for whom the leave request is being created. This could be the request for self or other users (if user has permission to create leave request on behalf of others) |
| |
leaveType | Object | This contains the details of leave type |
| |
leaveType | id | Number | Add the leave type ID. Users must ensure that the type of leave they select aligns with the policies associated with the user profile for whom leave request is being created. | 9016, 7711, 8259, etc. |
reason | String | Reason for the leave application. This parameter can be optional, it depends on leave policy settings. |
| |
fromDate | Date | Date from when leaves duration starts. Date format should be yyyy-MM-dd. |
| |
toDate | Date | Date when leaves duration ends. Date format should be yyyy-MM-dd. |
| |
allFullDays | String |
|
| |
leaveApplicationDates | Object | This contains the details of the leave dates and duration of each day of leaves |
| |
leaveApplicationDates | leaveDate | Date | Leave date/s | 2024-7-15 |
leaveApplicationDates | duration | String | Duration of each day’s leave |
|
visibility | Object | This is for the details of the visibility of the leave request |
| |
visibility | teams | String | List of teams with whom the leave application is shared | Sales, Support, etc. |
visibility | users | String | Account IDs of the users with whom leave application is shared |
|
Sample response JSON
{ "id": 4245, "requestFor": { "id": 6140, "jiraUserRestApiUrl": "https://upraise-cloud.atlassian.net/rest/api/2/user?accountId=6327fe4c61dbef2805bb9a62" }, "fromDate": "2024-7-15", "toDate": "2024-7-17", "noOfDays": 2, "reason": "Due to ill health.", "approver": { "id": 6128, "jiraUserRestApiUrl": "https://upraise-cloud.atlassian.net/rest/api/2/user?accountId=557058:47071b1a-8622-4333-aa39-7db293f3aa34" } }
Response parameters
Parent | Parameter | Type | Description | Possible values |
---|---|---|---|---|
id | Number | User ID who created the leave request | 6751, 6771, etc. | |
requestFor | Object | This object contains all the details of the user for whom the request is created |
| |
requestFor | id | Number | User ID for whom request is created | 88, 82, etc. |
requestFor | jiraUserRestApiUrl | String | User’s Jira user Rest API URL | <baseURL>/rest/api/2/user?accountId=6327fe4c61dbef2805bb9a62 |
fromDate | Date | Date from when leaves duration starts. Date format should be yyyy-MM-dd. |
| |
toDate | Date | Date when leaves duration ends. Date format should be yyyy-MM-dd. |
| |
noOfDays | Number | Number of days in leave duration based on start and end dates as well as the duration of each day like full day, half day. | Any number | |
reason | Sring | Reason for the leave application. It can be option if that’s how the leave policy set up is done | Any reason for leave application | |
approver | Object | This object contains user details of the leave approver |
| |
approver | id | Number | User ID for whom request is created | 88, 82, etc. |
approver | jiraUserRestApiUrl | String | User’s Jira user Rest API URL | <baseURL>/ |