ProRoster - Get absence reasons
API Url
Use it for returning all the absence reasons, no link to employee category.
http://localhost:16010/ProMarkREST/rest/ProRoster/reasons
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
dateoptional | Date | Attendance date for which its needed to load the list of reasons. |
empIdsoptional | String | Comma seperated list of employee Ids. |
scopeoptional | String | 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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| reasons | Object[] | |
| backColor | String | Background color in HEX without #. |
| code | String | The reason code (identifier). |
| description | String | Description of the absence reason. |
| favorite | Logical | True if the absence reason is favorite. |
| foreColor | String | Foreground color in HEX without #. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |