General - Delete absence
API Url
Delete 1 or more absences. The API will verifyt if it's allowed to delete absences for other employees.
http://localhost:16010/ProMarkREST/rest/General/absences
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| absences | Object[] | Collection of absence intervals. |
| attendanceDate | Date | Attendance date to be absented. |
| code | String | The reason code (identifier). |
| empId | String | The employee ID. |
endTimeoptional | Number | End time of interval for category setup. |
hoursoptional | Number | The absence time expressed in seconds. It's not needed if reason code is set-up as being percent of normal time or star-end setup. |
| id | String | Unique identifier for the absence object |
startTimeoptional | Number | Start time of interval for category setup. |
| type | Number | Absence type (1: All-day, 2: Anytime, 3: Before Clock-in, 4: After Clock-out, 5: All-shift). 1-5 |
Request example for partial absence as time interval:
{"request": {"data": {"absences": [{"id": "2153604964~\u00002~\u000030600""empId": "804","attendanceDate": "2017-06-22","type": 2,"code": "W","hours": 0,"startTime": 30600,"endTime": 34200,}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| errorCode | Number | Error Code |
| errorMessage | String | Message description of the error. |
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |
Error example:
HTTP/1.1 404 Request timeout{"response": {"errorCode": 426,"errorMessage": "Employee not exist"}}