SelfService - Get single absence request
API Url
Used in Self-service for loading a single absence request by unique id.
http://localhost:16010/ProMarkREST/rest/SelfService/absences/{id}
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| id | Number | Unique indentifier of the absence request. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| absences | Object[] | Object containing the absence requests. |
acceptBeforeoptional | Date | Date until you want the request to be accepted. |
actionsoptional | Object[] | List of actions that can be performed on the request. |
| id | String | Action identifier ("accept", "cancel", "decline"). |
| name | String | Short action name. |
| attendanceDate | Date | Shift attendance date. |
commentoptional | String | Comment on the absence request. |
contactoptional | String | Contact person. |
| dayProfileDesc | String | Day profile description of the shift. |
| dayProfileId | String | The day profile ID of the shift. |
| empId | String | The employee ID. Owner of the shift. |
| empName | String | The employee full name. |
| id | Number | Unique identifier of the absence request. |
| reasons | Object[] | The absence reasons. |
| backColor | String | Absence reason background color as HEX. |
| code | String | The absence reason code. |
| description | String | The absence reason description. |
| foreColor | String | Absence reason text as HEX. |
hoursoptional | Number | The absence time expressed in seconds. It's not needed if reason code is set-up as being percent of normal time. |
| type | Number | Absence type (1: All-day, 2: Anytime, 3: Before Clock-in, 4: After Clock-out, 5: All-shift). 1-5 |
| statusCode | Number | Status code of the offer request (0: Vacant shift, 1: Waiting for manager, 2: Wating for employee, 3: Approved by employee, waiting for manager/approver, 4: Approved by employee, waiting for 2nd manager/approver, 5: Rejected by employee, 6: Rejected by manager/approver, 7: Approved by manager/approver, 8: Approved, 99: Request was deleted). 0-99 |
| statusMessage | String | Status message of the offer request. In correlation with 'statusCode'. |
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": {"absences": [{"id": 123456789,"statusCode": 3,"statusMessage": "Waiting for manager approval","empId": "414","attendanceDate": "2017-06-07","dayProfileId": "SH1","dayProfileDesc": "Midday shift,"acceptBefore": "2017-06-06","comment": "Doctor appointment in the morning","reasons": [{"type": 3,"code": "DR","description": "Doctor","hours": 7200,"backColor": FFFFFF,"foreColor": 000000}],"actions": [{"id": "cancel","name": "Cancel"}]}]}}}
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. |