GET api/LeaveReasons
Use to get all the leave reasons and linked leave types
Request Information
URI Parameters
(i.e.queryString parameters in the form ?param1={param1}¶m2={param2})
| Name | Description | Type | Additional information |
|---|---|---|---|
| page |
The page number to return using the pageSize parameter to define pages. Defaults to 1000. |
integer |
Default value is 1 |
| pageSize |
The page size (number of records) to be used to find the record for the page requested. Defaults to 10. |
integer |
Default value is 1000 |
Body Parameters
None.
Response Information
Resource Description
The requested leave reasons as a PagedObject of type LeaveReasonView
PagedObjectOfLeaveReasonView| Name | Description | Type | Additional information |
|---|---|---|---|
| Items | Collection of LeaveReasonView |
None. |
|
| PageInfo | PagedListPageInfo |
None. |
Response Formats
application/json, text/json
Sample:
{
"items": [
{
"leaveReasonCode": "sample string 2",
"leaveReasonDescription": "sample string 3",
"leaveType": "sample string 4",
"leaveCode": "sample string 5",
"leaveDescription": "sample string 6",
"payrollLinkToken": "277a5548-2ac7-4b5a-9f35-71b54e3e79d2"
},
{
"leaveReasonCode": "sample string 2",
"leaveReasonDescription": "sample string 3",
"leaveType": "sample string 4",
"leaveCode": "sample string 5",
"leaveDescription": "sample string 6",
"payrollLinkToken": "277a5548-2ac7-4b5a-9f35-71b54e3e79d2"
}
],
"pageInfo": {
"page": 1,
"pageSize": 2,
"totalCount": 3,
"totalPages": 4,
"countThisPage": 5,
"hasPreviousPage": true,
"hasNextPage": true,
"errorMessage": "sample string 8"
}
}
application/xml, text/xml
Sample:
<PagedObjectOfLeaveReasonView xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Items>
<LeaveReasonView>
<LeaveReasonId>1</LeaveReasonId>
<LeaveReasonCode>sample string 2</LeaveReasonCode>
<LeaveReasonDescription>sample string 3</LeaveReasonDescription>
<LeaveType>sample string 4</LeaveType>
<LeaveCode>sample string 5</LeaveCode>
<LeaveDescription>sample string 6</LeaveDescription>
<PayrollLinkToken>277a5548-2ac7-4b5a-9f35-71b54e3e79d2</PayrollLinkToken>
</LeaveReasonView>
<LeaveReasonView>
<LeaveReasonId>1</LeaveReasonId>
<LeaveReasonCode>sample string 2</LeaveReasonCode>
<LeaveReasonDescription>sample string 3</LeaveReasonDescription>
<LeaveType>sample string 4</LeaveType>
<LeaveCode>sample string 5</LeaveCode>
<LeaveDescription>sample string 6</LeaveDescription>
<PayrollLinkToken>277a5548-2ac7-4b5a-9f35-71b54e3e79d2</PayrollLinkToken>
</LeaveReasonView>
</Items>
<PageInfo>
<Page>1</Page>
<PageSize>2</PageSize>
<TotalCount>3</TotalCount>
<TotalPages>4</TotalPages>
<CountThisPage>5</CountThisPage>
<HasPreviousPage>true</HasPreviousPage>
<HasNextPage>true</HasNextPage>
<ErrorMessage>sample string 8</ErrorMessage>
</PageInfo>
</PagedObjectOfLeaveReasonView>