POST api/LeaveApplication
All leave application requests are considered to be new requests and must be a POST. Do not use PUT or DELETE, rather set the ChangeType to one of Add, Change, Edit (i.e. Add if new or Change if existing) or Delete then POST the request.
Request Information
URI Parameters
(i.e.queryString parameters in the form ?param1={param1}¶m2={param2})
None.
Body Parameters
LeaveApplicationViewName | Description | Type | Additional information |
---|---|---|---|
Leave  ApplicationId |
integer |
None. |
|
ChangeType |
The ChangeType for the Leave Application. Only Add (Insert) is currently supported. |
string |
Required Matching: ([^'"])* Max length: 20 |
ChangeStatus |
The ChangeStatus for the Leave Application. Do not supply |
string |
Matching: ([^'"])* Max length: 20 |
EmpCode |
The EmpCode for the Leave Application. |
string |
Matching: ([^'"])* Max length: 20 |
StartDate |
The Start Date for the Leave Application. |
date |
None. |
EndDate |
The End Date for the Leave Application. |
date |
None. |
IsHour  Application |
IsHourApplication must be True for EasyPay to accept StartTime and EndTime to import as Hourly Leave Application. |
boolean |
None. |
StartTime |
The Start Time for the Leave Application. |
time interval |
None. |
EndTime |
The End Time for the Leave Application. |
time interval |
None. |
StartSession |
The Start Session for the Leave Application. 1st or 2nd. Optional. |
byte |
None. |
EndSession |
The End Session for the Leave Application. 1st or 2nd. Optional. |
byte |
None. |
LeaveStatus |
The Leave Status for the Leave Application. Values are Applied, Approved, Cancelled, Declined |
string |
Matching: ([^'"])* Max length: 10 |
PublicHoliday  Code |
string |
Matching: ([^'"])* Max length: 50 |
|
LeaveType |
The LeaveType for the LeaveProcess. Values SickLeave, AnnualLeave, LongServiceLeave, UserDefinedLeave |
string |
Matching: ([^'"])* Max length: 50 |
LeaveReason |
The Leave Reason for the Leave Application. Leave Reason codes may be found using api/Lookups?type=LeaveReason |
string |
Matching: ([^'"])* |
LeaveCode |
The UserDefinedLeave LeaveCode for Leave Application. |
string |
Matching: ([^'"])* |
Override |
The Override for the Leave Application. Must be true to for value in HoursTaken to be accepted. |
boolean |
None. |
LeaveHours |
The Leave Hours for the Leave Application. |
decimal number |
None. |
LeaveDays |
The Leave Hours for the Leave Application. |
decimal number |
None. |
ReferenceNumber |
An optional Reference Number for the Leave Application. |
string |
Matching: ([^'"])* |
PayInAdvance |
The Pay In Advance flag for the Leave Application. |
boolean |
None. |
NumberofPeriods | integer |
None. |
|
Processed | boolean |
None. |
|
Source | string |
None. |
|
ApiLeave  PlanningId |
integer |
None. |
|
ApiUserId | integer |
None. |
|
ApiUserType | string |
None. |
|
ApiUserName | string |
None. |
|
ApiUserGroup  Code |
string |
None. |
|
PayrollLink  Token |
globally unique identifier |
None. |
|
DatabaseType | string |
None. |
|
ReceivedDate  Time |
date |
None. |
|
PickedUpDate  Time |
date |
None. |
|
RejectedDate  Time |
date |
None. |
|
DeletedDateTime | date |
None. |
|
PayrollReference  Number |
string |
None. |
|
ErrorMessage | string |
None. |
|
IsEss | boolean |
None. |
Request Formats
application/json, text/json
{ "leaveApplicationId": 1, "changeType": "sample string 1", "changeStatus": "sample string 2", "empCode": "sample string 3", "startDate": "2024-11-23T04:30:31.1956124+11:00", "endDate": "2024-11-23T04:30:31.1956124+11:00", "isHourApplication": true, "startTime": "00:00:00.1234567", "endTime": "00:00:00.1234567", "startSession": 64, "endSession": 64, "leaveStatus": "sample string 4", "publicHolidayCode": "sample string 5", "leaveType": "sample string 6", "leaveReason": "sample string 7", "leaveCode": "sample string 8", "override": true, "leaveHours": 1.1, "leaveDays": 1.1, "referenceNumber": "sample string 10", "payInAdvance": true, "numberofPeriods": 1, "processed": true, "source": "sample string 11", "apiLeavePlanningId": 1, "apiUserId": 12, "apiUserType": "sample string 13", "apiUserName": "sample string 14", "apiUserGroupCode": "sample string 15", "payrollLinkToken": "83812f5c-f244-44ee-964c-7a2c265ae6fb", "databaseType": "sample string 16", "receivedDateTime": "2024-11-23T04:30:31.1956124+11:00", "pickedUpDateTime": "2024-11-23T04:30:31.1956124+11:00", "rejectedDateTime": "2024-11-23T04:30:31.1956124+11:00", "deletedDateTime": "2024-11-23T04:30:31.1956124+11:00", "payrollReferenceNumber": "sample string 17", "errorMessage": "sample string 18", "isEss": true }
application/xml, text/xml
<LeaveApplicationView xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <LeaveApplicationId>1</LeaveApplicationId> <ChangeType>sample string 1</ChangeType> <ChangeStatus>sample string 2</ChangeStatus> <EmpCode>sample string 3</EmpCode> <StartDate>2024-11-23T04:30:31.1956124+11:00</StartDate> <EndDate>2024-11-23T04:30:31.1956124+11:00</EndDate> <IsHourApplication>true</IsHourApplication> <StartTime /> <EndTime /> <StartSession>64</StartSession> <EndSession>64</EndSession> <LeaveStatus>sample string 4</LeaveStatus> <PublicHolidayCode>sample string 5</PublicHolidayCode> <LeaveType>sample string 6</LeaveType> <LeaveReason>sample string 7</LeaveReason> <LeaveCode>sample string 8</LeaveCode> <Override>true</Override> <LeaveHours>1.1</LeaveHours> <LeaveDays>1.1</LeaveDays> <ReferenceNumber>sample string 10</ReferenceNumber> <PayInAdvance>true</PayInAdvance> <NumberofPeriods>1</NumberofPeriods> <Processed>true</Processed> <Source>sample string 11</Source> <ApiLeavePlanningId>1</ApiLeavePlanningId> <ApiUserId>12</ApiUserId> <ApiUserType>sample string 13</ApiUserType> <ApiUserName>sample string 14</ApiUserName> <ApiUserGroupCode>sample string 15</ApiUserGroupCode> <PayrollLinkToken>83812f5c-f244-44ee-964c-7a2c265ae6fb</PayrollLinkToken> <DatabaseType>sample string 16</DatabaseType> <ReceivedDateTime>2024-11-23T04:30:31.1956124+11:00</ReceivedDateTime> <PickedUpDateTime>2024-11-23T04:30:31.1956124+11:00</PickedUpDateTime> <RejectedDateTime>2024-11-23T04:30:31.1956124+11:00</RejectedDateTime> <DeletedDateTime>2024-11-23T04:30:31.1956124+11:00</DeletedDateTime> <PayrollReferenceNumber>sample string 17</PayrollReferenceNumber> <ErrorMessage>sample string 18</ErrorMessage> <IsEss>true</IsEss> </LeaveApplicationView>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
The unique id (LeaveApplicationId : integer) of the Leave Application record created
HttpResponseMessageName | Description | Type | Additional information |
---|---|---|---|
Version | Version |
None. |
|
Content | HttpContent |
None. |
|
StatusCode | HttpStatusCode |
None. |
|
ReasonPhrase | string |
None. |
|
Headers |
Collection of HttpResponse  Headers |
None. |
|
RequestMessage | HttpRequestMessage |
None. |
|
IsSuccessStatus  Code |
boolean |
None. |