GET Payroll/LeaveRequest/id

Retrieve a single leave request entry.

Request Information

URI Parameters

Name Description Type Additional information
WsAccessKey The Web Service access key for this user and file which allows access to the API for the associated file (found in File - Settings). Using OAuth authentication mechanism is the preferred method to allow API access. string

Optional. Legacy authentication method and only required if not using OAuth. OAuth is preferred.

FileId Specifies the file id of the file to perform the operation upon. integer

Required

id No documentation available. integer

Required

Body Parameters

None.

Response Information

Resource Description

LeaveRequestDto
Name Description Type Additional information
Id The id of the leave request. This data is returned only and cannot be added or updated when issuing a POST or PUT. integer

None.

CreatedDateUtc The date and time this resource was created in UTC. This data is returned only and cannot be added or updated when issuing a POST or PUT. date

None.

LastModifiedDateUtc The date and time this resource was last modified in UTC. This data is returned on GET but required on update (PUT). Used to check concurreny when performing updates. date

None.

LeaveTypePayItemId The pay item id of the leave / entitlement pay item. For a list of leave / entitlement pay items, see GET /Payroll/Entitlements. integer

Required

EmployeeId The id/key of the employee / contact record. integer

Required

StartDate Leave start date. date

Required

EndDate Leave end date. Must be >= start date. Max duration. 3 months (63 days). date

Required

TotalHours Total hours in this leave. The sum of all hours in the Items. This data is returned only and cannot be added or updated when issuing a POST or PUT. decimal number

None.

Status Leave status. Valid values are: "Pending", "Approved", "Rejected". string

Required

Notes Notes. string

None.

Items Leave breakdown/allocation by date. Must be provided for approved leave requests. Pay run will pick up hours entered here when processing leaves payment and adjust hours worked accordingly. Collection of LeaveRequestItemDto

None.

_links Hypermedia links. Contains contextual links to possible next actions related to this resource. Only present in responses. This data is not to be sent to the server. Collection of Link

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "CreatedDateUtc": "2024-12-04T19:46:51.574867+11:00",
  "LastModifiedDateUtc": "2024-12-04T19:46:51.574867+11:00",
  "LeaveTypePayItemId": 4,
  "EmployeeId": 5,
  "StartDate": "2024-12-04T19:46:51.574867+11:00",
  "EndDate": "2024-12-04T19:46:51.574867+11:00",
  "TotalHours": 1.0,
  "Status": "sample string 8",
  "Notes": "sample string 9",
  "Items": [
    {
      "LineNumber": 1,
      "Date": "2024-12-04T19:46:51.574867+11:00",
      "Hours": 3.0,
      "IsPaid": true,
      "ProcessedInPayRunId": 1
    },
    {
      "LineNumber": 1,
      "Date": "2024-12-04T19:46:51.574867+11:00",
      "Hours": 3.0,
      "IsPaid": true,
      "ProcessedInPayRunId": 1
    }
  ],
  "_links": [
    {
      "rel": "sample string 1",
      "href": "sample string 2",
      "method": "sample string 3",
      "title": "sample string 4"
    },
    {
      "rel": "sample string 1",
      "href": "sample string 2",
      "method": "sample string 3",
      "title": "sample string 4"
    }
  ]
}

application/xml, text/xml

Sample:
<LeaveRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <_links>
    <Link>
      <rel>sample string 1</rel>
      <href>sample string 2</href>
      <method>sample string 3</method>
      <title>sample string 4</title>
    </Link>
    <Link>
      <rel>sample string 1</rel>
      <href>sample string 2</href>
      <method>sample string 3</method>
      <title>sample string 4</title>
    </Link>
  </_links>
  <Id>1</Id>
  <CreatedDateUtc>2024-12-04T19:46:51.574867+11:00</CreatedDateUtc>
  <LastModifiedDateUtc>2024-12-04T19:46:51.574867+11:00</LastModifiedDateUtc>
  <LeaveTypePayItemId>4</LeaveTypePayItemId>
  <EmployeeId>5</EmployeeId>
  <StartDate>2024-12-04T19:46:51.574867+11:00</StartDate>
  <EndDate>2024-12-04T19:46:51.574867+11:00</EndDate>
  <TotalHours>1</TotalHours>
  <Status>sample string 8</Status>
  <Notes>sample string 9</Notes>
  <Items>
    <LeaveRequestItem>
      <LineNumber>1</LineNumber>
      <Date>2024-12-04T19:46:51.574867+11:00</Date>
      <Hours>3</Hours>
      <IsPaid>true</IsPaid>
      <ProcessedInPayRunId>1</ProcessedInPayRunId>
    </LeaveRequestItem>
    <LeaveRequestItem>
      <LineNumber>1</LineNumber>
      <Date>2024-12-04T19:46:51.574867+11:00</Date>
      <Hours>3</Hours>
      <IsPaid>true</IsPaid>
      <ProcessedInPayRunId>1</ProcessedInPayRunId>
    </LeaveRequestItem>
  </Items>
</LeaveRequest>