ProRoster - Get absence reasons

API Url

Use it for returning all the absence reasons, no link to employee category.

GET
http://localhost:16010/ProMarkREST/rest/ProRoster/reasons

Permissions: user

Query parameters

FieldTypeDescription
dateoptionalDate

Attendance date for which its needed to load the list of reasons.

empIdsoptionalString

Comma seperated list of employee Ids.

scopeoptionalString

Comma seperated list of absence scopes. Only absences of the mentioned scope will be returned. Default is 0,1,2 0 - All day, 1 - Part Day, 2 - Both.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    reasonsObject[]
      backColorString

Background color in HEX without #.

      codeString

The reason code (identifier).

      descriptionString

Description of the absence reason.

      favoriteLogical

True if the absence reason is favorite.

      foreColorString

Foreground color in HEX without #.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"reasons": [
{
"code": "M",
"description": "Maternity",
"favorite": false,
"foreColor": "000000",
"backColor": "ffffff"
},
{
"code": "SICK12",
"description": "Cold",
"favorite": false,
"foreColor": "000000",
"backColor": "ffffff"
},
]
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.