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}&param2={param2})

NameDescriptionTypeAdditional 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
NameDescriptionTypeAdditional 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": "434ec5d8-b7ae-450f-895c-85e6c018bb41"
    },
    {
      "leaveReasonCode": "sample string 2",
      "leaveReasonDescription": "sample string 3",
      "leaveType": "sample string 4",
      "leaveCode": "sample string 5",
      "leaveDescription": "sample string 6",
      "payrollLinkToken": "434ec5d8-b7ae-450f-895c-85e6c018bb41"
    }
  ],
  "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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <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>434ec5d8-b7ae-450f-895c-85e6c018bb41</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>434ec5d8-b7ae-450f-895c-85e6c018bb41</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>