SelfService - Get shifts you can swop with
API Url
Used in Self-service for loading employee shifts you can swop with. This is according to Self-service swop method and it's including favourite co-workers.
http://localhost:16010/ProMarkREST/rest/SelfService/swop-shifts
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
addEmpIdoptional | String | List of employee IDs for which to see swop-shifts |
empIdoptional | String | Comma separated list of employee IDs. Used for filtering shifts. |
fromoptional | Date | Show shifts from this date (ISO-8601). Default is TODAY. |
tooptional | Date | Show shifts until this date (ISO-8601). Default is 'from' + 7 days (one week). |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| swopShifts | Object[] | Collection of shifts you can swop with. |
backColoroptional | String | Backcolor of shift as HEX. |
clockInoptional | Date | Shift start date-time as ISO-8601. |
clockOutoptional | Date | Shift end date-time as ISO-8601. |
| dayProfileDesc | String | Day profile description. |
| dayProfileId | String | Day profile ID of the shift. |
| empId | String | Employee ID, owner of shift. |
| empName | String | Employee full name. |
foreColoroptional | String | Forecolor of shift as HEX. |
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": {"swopShifts": [{"empId": "392","empName": "Michael Kors","attendanceDate": "2017-06-21","dayProfileId": "M002","dayProfileDesc": "Morning shift 10-16","clockIn": "2017-06-21T10:00:00.000","clockOut": "2017-06-21T16:00:00.000","foreColor": "F30C51","backColor": "568DF3"}]},"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. |