General - Delete absence

API Url

Delete 1 or more absences. The API will verifyt if it's allowed to delete absences for other employees.

DELETE
http://localhost:16010/ProMarkREST/rest/General/absences

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    absencesObject[]

Collection of absence intervals.

      attendanceDateDate

Attendance date to be absented.

      codeString

The reason code (identifier).

      empIdString

The employee ID.

      endTimeoptionalNumber

End time of interval for category setup.

      hoursoptionalNumber

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.

      idString

Unique identifier for the absence object

      startTimeoptionalNumber

Start time of interval for category setup.

      typeNumber

Absence type (1: All-day, 2: Anytime, 3: Before Clock-in, 4: After Clock-out, 5: All-shift).

Size range: 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

FieldTypeDescription
  errorCodeNumber

Error Code

  errorMessageString

Message description of the error.

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

HTTP/1.1 404 Request timeout
{
"response": {
"errorCode": 426,
"errorMessage": "Employee not exist"
}
}