POST api/Absence/{employeeNo}/{startDate}
Update an Absence for an Employee. The key for updates is the StartDate
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
employeeNo |
Employee Number |
string |
Required |
startDate |
Start Date in the format yyyy-MM-dd |
date |
Required |
Body Parameters
In request Body: Employee Absence Details
AbsenceDetailName | Description | Type | Additional information |
---|---|---|---|
StartDate | date |
Required |
|
EndDate |
Must be after StartDate |
date |
Required |
AbsenceType |
1 = Holiday, 2 = Sickness, 3 = Unpaid Leave |
integer |
Required |
NoOfUnits | decimal number |
Required |
|
PayMaximumDays | boolean |
None. |
Request Formats
application/json, text/json
Sample:
{ "StartDate": "2022-02-09T11:08:37.966519+00:00", "EndDate": "2022-02-11T11:08:37.966519+00:00", "AbsenceType": 2, "NoOfUnits": 4.0, "PayMaximumDays": false }
application/xml, text/xml
Sample:
<AbsenceDetail> <AbsenceType>2</AbsenceType> <EndDate>2022-02-11T11:08:37.966519+00:00</EndDate> <NoOfUnits>4</NoOfUnits> <StartDate>2022-02-09T11:08:37.966519+00:00</StartDate> </AbsenceDetail>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Result
ResultWithMessageName | Description | Type | Additional information |
---|---|---|---|
result |
'OK', 'Error' |
string |
None. |
message |
Returns if result is Error |
string |
None. |
returnValue | string |
None. |
Response Formats
application/json, text/json
Sample:
{ "result": "OK" } { "result": "Error", "message": "Unable to save: the..." }
application/xml, text/xml
Sample:
<ResultWithMessage> <result>OK</result> </ResultWithMessage> <ResultWithMessage> <result>Error</result> <message>Unable to save: the...</message> </ResultWithMessage>