PUT Payroll/LeaveRequest/id

Update a leave request.

Request Information

URI Parameters

Name Description Type Additional information
FileUid No documentation available. integer

None.

BrandUid No documentation available. integer

None.

id No documentation available. integer

Required

Body Parameters

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.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "CreatedDateUtc": "2024-12-22T03:21:33.9308412+11:00",
  "LastModifiedDateUtc": "2024-12-22T03:21:33.9308412+11:00",
  "LeaveTypePayItemId": 4,
  "EmployeeId": 5,
  "StartDate": "2024-12-22T03:21:33.9308412+11:00",
  "EndDate": "2024-12-22T03:21:33.9308412+11:00",
  "TotalHours": 1.0,
  "Status": "sample string 8",
  "Notes": "sample string 9",
  "Items": [
    {
      "LineNumber": 1,
      "Date": "2024-12-22T03:21:33.9308412+11:00",
      "Hours": 3.0,
      "IsPaid": true,
      "ProcessedInPayRunId": 1
    },
    {
      "LineNumber": 1,
      "Date": "2024-12-22T03:21:33.9308412+11:00",
      "Hours": 3.0,
      "IsPaid": true,
      "ProcessedInPayRunId": 1
    }
  ],
  "_links": []
}

application/xml, text/xml

Sample:
<LeaveRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <_links />
  <Id>1</Id>
  <CreatedDateUtc>2024-12-22T03:21:33.9308412+11:00</CreatedDateUtc>
  <LastModifiedDateUtc>2024-12-22T03:21:33.9308412+11:00</LastModifiedDateUtc>
  <LeaveTypePayItemId>4</LeaveTypePayItemId>
  <EmployeeId>5</EmployeeId>
  <StartDate>2024-12-22T03:21:33.9308412+11:00</StartDate>
  <EndDate>2024-12-22T03:21:33.9308412+11:00</EndDate>
  <TotalHours>1</TotalHours>
  <Status>sample string 8</Status>
  <Notes>sample string 9</Notes>
  <Items>
    <LeaveRequestItem>
      <LineNumber>1</LineNumber>
      <Date>2024-12-22T03:21:33.9308412+11:00</Date>
      <Hours>3</Hours>
      <IsPaid>true</IsPaid>
      <ProcessedInPayRunId>1</ProcessedInPayRunId>
    </LeaveRequestItem>
    <LeaveRequestItem>
      <LineNumber>1</LineNumber>
      <Date>2024-12-22T03:21:33.9308412+11:00</Date>
      <Hours>3</Hours>
      <IsPaid>true</IsPaid>
      <ProcessedInPayRunId>1</ProcessedInPayRunId>
    </LeaveRequestItem>
  </Items>
</LeaveRequest>

Response Information

Resource Description

InsertUpdateResult
Name Description Type Additional information
Id No documentation available. integer

None.

LastModifiedDateUtc No documentation available. string

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "LastModifiedDateUtc": "sample string 2"
}

application/xml, text/xml

Sample:
<InsertUpdateResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Id>1</Id>
  <LastModifiedDateUtc>sample string 2</LastModifiedDateUtc>
</InsertUpdateResult>