Leave application listing

Background

This API is to get the list of leave requests.

API Details

The API operates using a User level API token, resulting in user-specific responses. The response is determined by the user's permission to create leave for other users, as outlined below -

Request

Below are the endpoints for this API based on which UpRaise app you are using

 

Request parameters

Parent

Parameter

Type

Description

Possible values

Parent

Parameter

Type

Description

Possible values

 

startAt

Numeric

Page number whose results are returned in the response.

0, 1, 2, 3, etc.

 

maxResults

Numeric

This will show the max number of results on any given page.

10, 20, etc.

 

leaveTypes

String

Given leave types in your leave policies

Sick leave, Casual leave, etc.

 

startDate

Date

This is to specify the duration of leaves. Specify from which date you want to get the list of leaves.. Date format should be yyyy-MM-dd.

  • 2024-07-23

  • 2023-06-12

 

endDate

Date

This is to specify the duration of leaves. Specify till which date you want to get the list of leaves. Date format should be yyyy-MM-dd.

  • 2024-06-28

  • 2023-07-12

 

approvers

String

Specify the account IDs of leave approvers

  • 63da09ac010d3563984670cff8

  • 67ca08gc000d3563773chh9

 

statuses

Integer

Specify from what statuses you want to get the leaves list

APPLIED(1)
APPROVED(2)
AVAILED(3)
 CANCELLED(4)
REJECTED(5)
AVAILED_WITHOUT_APPROVAL(7)
AVAILED_PAST_DATED(6)

 

requestedFor

String

Specify for account IDs of users who requested the leaves

  • 63da09ac010d35637970cff8

  • 67ca08gc000d35637970chh9

Sample JSON response

{ "startAt": 0, "maxResults": 10, "total": 389, "dateTimeFormat": "dd/MM/yy hh:mm a", "dateFormat": "dd/MM/yy", "results": [ { "id": 4243, "requestFor": { "id": 6187, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:abffcb82-281b-422b-ad3a-683362ccd4db" }, "fromDate": "14/08/24", "toDate": "21/08/24", "reason": "sdg", "reasonInHtml": "<div><p>sdg</p></div>", "approver": { "id": 29041, "jiraUserRestApiUrl": "<<baseURL>>/rest/api/2/user?accountId=5f21e250ef11df0025988f71" }, "noOfDays": 4.0, "leaveType": { "id": 2548, "name": "test1" }, "status": { "id": 4, "name": "cancelled" }, "createdBy": { "id": 6187, "jiraUserRestApiUrl": "<<baseURL>>/rest/api/2/user?accountId=557058:abffcb82-281b-422b-ad3a-683362ccd4db" }, "created": "11/06/24 01:50 AM", "modifiedBy": { "id": 6187, "jiraUserRestApiUrl": "<<baseURL>>/rest/api/2/user?accountId=557058:abffcb82-281b-422b-ad3a-683362ccd4db" }, "modifiedOn": "11/06/24 01:50 AM" }, { "id": 4221, "requestFor": { "id": 6094, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:ce2503bb-4d02-4c55-be11-bb5ea51cbd90" }, "fromDate": "06/08/24", "toDate": "20/08/24", "reason": "testing dont approve", "reasonInHtml": "<div><p>testing dont approve</p></div>", "approver": { "id": 6233, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63da09ac010d35637970cff8" }, "noOfDays": 11.0, "leaveType": { "id": 2132, "name": "new policy type that does not exist here" }, "status": { "id": 1, "name": "applied" }, "createdBy": { "id": 6094, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:ce2503bb-4d02-4c55-be11-bb5ea51cbd90" }, "created": "03/06/24 08:55 AM", "modifiedBy": { "id": 6094, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:ce2503bb-4d02-4c55-be11-bb5ea51cbd90" }, "modifiedOn": "03/06/24 08:56 AM" }, { "id": 4244, "requestFor": { "id": 6187, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:abffcb82-281b-422b-ad3a-683362ccd4db" }, "fromDate": "24/07/24", "toDate": "26/07/24", "reason": "test behalf condition", "reasonInHtml": "<div><p>test behalf condition</p></div>", "approver": { "id": 6140, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=6327fe4c61dbef2805bb9a62" }, "noOfDays": 2.0, "leaveType": { "id": 2551, "name": "test4-edit" }, "status": { "id": 2, "name": "approved" }, "createdBy": { "id": 6140, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=6327fe4c61dbef2805bb9a62" }, "created": "11/06/24 01:56 AM", "modifiedBy": { "id": 29041, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=5f21e250ef11df0025988f71" }, "modifiedOn": "11/06/24 02:03 AM" }, { "id": 4212, "requestFor": { "id": 5857, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=5fb4a9df0dd553006f342981" }, "fromDate": "22/07/24", "toDate": "22/07/24", "reason": "", "reasonInHtml": "", "approver": { "id": 6148, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:e1ebe98a-5883-4e91-a806-3e376f536c12" }, "noOfDays": 1.0, "leaveType": { "id": 2133, "name": "new leave to be disabled" }, "status": { "id": 4, "name": "cancelled" }, "createdBy": { "id": 6141, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=607e67ab9567330069906dc0" }, "created": "30/05/24 09:11 AM", "modifiedBy": { "id": 6233, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63da09ac010d35637970cff8" }, "modifiedOn": "17/06/24 06:41 PM" }, { "id": 4242, "requestFor": { "id": 6187, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:abffcb82-281b-422b-ad3a-683362ccd4db" }, "fromDate": "17/07/24", "toDate": "19/07/24", "reason": "", "reasonInHtml": "", "approver": { "id": 29041, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=5f21e250ef11df0025988f71" }, "noOfDays": 2.0, "leaveType": { "id": 2549, "name": "test2" }, "status": { "id": 4, "name": "cancelled" }, "createdBy": { "id": 6187, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:abffcb82-281b-422b-ad3a-683362ccd4db" }, "created": "11/06/24 01:49 AM", "modifiedBy": { "id": 6140, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=6327fe4c61dbef2805bb9a62" }, "modifiedOn": "11/06/24 01:55 AM" }, { "id": 4288, "requestFor": { "id": 6244, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63f32afafb3ac4003fa1c778" }, "fromDate": "16/07/24", "toDate": "16/07/24", "reason": "", "reasonInHtml": "", "approver": { "id": 6233, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63da09ac010d35637970cff8" }, "noOfDays": 1.0, "leaveType": { "id": 2141, "name": "casul leave" }, "status": { "id": 2, "name": "approved" }, "createdBy": { "id": 6233, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63da09ac010d35637970cff8" }, "created": "25/06/24 07:17 AM", "modifiedBy": { "id": 6233, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63da09ac010d35637970cff8" }, "modifiedOn": "25/06/24 07:17 AM" }, { "id": 4245, "requestFor": { "id": 6140, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=6327fe4c61dbef2805bb9a62" }, "fromDate": "15/07/24", "toDate": "15/07/24", "reason": "Due to ill health.", "reasonInHtml": "<div><p>Due to ill health.</p></div>", "approver": { "id": 6128, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:47071b1a-8622-4333-aa39-7db293f3aa34" }, "noOfDays": 0.5, "leaveType": { "id": 2539, "name": "test1" }, "status": { "id": 4, "name": "cancelled" }, "createdBy": { "id": 6140, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=6327fe4c61dbef2805bb9a62" }, "created": "11/06/24 04:11 AM", "modifiedBy": { "id": 6233, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63da09ac010d35637970cff8" }, "modifiedOn": "17/06/24 06:41 PM" }, { "id": 4287, "requestFor": { "id": 6244, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63f32afafb3ac4003fa1c778" }, "fromDate": "12/07/24", "toDate": "12/07/24", "reason": "", "reasonInHtml": "", "approver": { "id": 6320, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63898a7d3e79f12e572462b1" }, "noOfDays": 1.0, "leaveType": { "id": 2197, "name": "test" }, "status": { "id": 1, "name": "applied" }, "createdBy": { "id": 6233, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63da09ac010d35637970cff8" }, "created": "25/06/24 07:15 AM", "modifiedBy": { "id": 6233, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63da09ac010d35637970cff8" }, "modifiedOn": "25/06/24 07:15 AM" }, { "id": 4286, "requestFor": { "id": 6244, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63f32afafb3ac4003fa1c778" }, "fromDate": "10/07/24", "toDate": "11/07/24", "reason": "", "reasonInHtml": "", "approver": { "id": 6320, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63898a7d3e79f12e572462b1" }, "noOfDays": 2.0, "leaveType": { "id": 2141, "name": "casul leave" }, "status": { "id": 7, "name": "availed-without approval" }, "createdBy": { "id": 6244, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63f32afafb3ac4003fa1c778" }, "created": "25/06/24 07:02 AM", "modifiedBy": { "id": 6244, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=63f32afafb3ac4003fa1c778" }, "modifiedOn": "09/07/24 04:01 AM" }, { "id": 4261, "requestFor": { "id": 6141, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=607e67ab9567330069906dc0" }, "fromDate": "05/07/24", "toDate": "05/07/24", "reason": "", "reasonInHtml": "", "approver": { "id": 6148, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=557058:e1ebe98a-5883-4e91-a806-3e376f536c12" }, "noOfDays": 1.0, "leaveType": { "id": 2133, "name": "new leave to be disabled" }, "status": { "id": 7, "name": "availed-without approval" }, "createdBy": { "id": 6141, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=607e67ab9567330069906dc0" }, "created": "14/06/24 08:03 AM", "modifiedBy": { "id": 6141, "jiraUserRestApiUrl": "<baseURL>/rest/api/2/user?accountId=607e67ab9567330069906dc0" }, "modifiedOn": "04/07/24 09:01 PM" } ] }

Response parameters

Parent

Parameter

Type

Description

Possible values

Parent

Parameter

Type

Description

Possible values

 

startAt

Numeric

Page number whose results are returned in the response.

0, 1, 2, 3, etc.

 

maxResults

Numeric

This will show the max number of results on any given page.

Maximum allowed value of 50. If more than 50 value is sent in the request, the app will consider 50.

 

total

Numeric

This will indicate how many results in total exist for the given search.

Any number

 

dateTimeFormat

String

Format definition of date fields returned in response.

Format definition of date and time fields returned in response.

 

dateFormat

String

Format definition of date fields returned in response.

Format definition of dateTime fields returned in response.

 

results

Object

This Object contains all the results of the teams retrieved from this API

 

 

id

Numeric

Array of users

1, 23, 45, etc.

 

requestFor

Object

Object that contains user details

 

requestFor

id

Numeric

UpRaise user id of user whos leave request is listed in the results

6087, 7890, etc.

requestFor

jiraUserRestApiUrl

string

Jira user Rest API URL of user whos leave request is listed in the results

<baseURL>/rest/api/2/user?accountId=557058:ce2503bb-4d02-4c55-be11-bb5ea51cbd90

 

fromDate

 

Date from when the leave records you want

12/07/24

 

toDate

 

Date till when you want the leave records

12/07/30

 

reason

string

Reason of the leave request

Any specified reason by user

 

reasonInHtml

string

Reason of leave request in HTML

<div><p>Any specified reason by user</p></div>

 

approver

Object

This object contains the deatils of leave approver

 

approver

id

Numeric

User ID of the leave approver

28929, 55252, etc.

approver

jiraUserRestApiUrl

string

Jira user Rest API URL of user who is leave approver

<baseURL>/rest/api/2/user?accountId=557058:ce2503bb-4d02-4c55-be11-bb5ea51cbd90

 

noOfDays

Numeric

Duration of leaves

2, 5, 7, 10, etc.

 

leaveType

string

This object contains details of the Leave type

 

leaveType

id

Numeric

Leave type ID

3234, 6789, etc.

leaveType

name

string

Leave type name

Sick leave, casual leave, etc.

 

status

Object

Leave status

 

status

id

Numeric

Leave status ID

2, 3, 7, 9, etc.

status

name

Integer

Leave status name

APPLIED(1)
APPROVED(2)
AVAILED(3)
 CANCELLED(4)
REJECTED(5)
AVAILED_WITHOUT_APPROVAL(7)
AVAILED_PAST_DATED(6)

 

createdBy

 

This object contains leave creator details

 

createdBy

id

Numeric

User ID who create leave

7822, 6772, etc.

createdBy

jiraUserRestApiUrl

string

Jira user Rest API URL of user who created leave

<baseURL>/rest/api/2/user?accountId=557058:ce2503bb-4d02-4c55-be11-bb5ea51cbd90

 

created

String

Date and time when leave request was created

14/06/24 08:03 AM

 

modifiedBy

string

This object contains the detaila of user who last modified the leave record

 

modifiedBy

id

Numeric

User ID who modified the leave record

6141, 6189, etc.

modifiedBy

jiraUserRestApiUrl

string

Jira user Rest API URL of user who modified the leave record

<baseURL>/rest/api/2/user?accountId=557058:ce2503bb-4d02-4c55-be11-bb5ea51cbd90

 

modifiedOn

String

Date & time when leave record was modified

04/07/24 09:01 PM