SelfService - Get single swop request
API Url
Used in Self-service for loading a single swop request by unique identifier.
http://localhost:16010/ProMarkREST/rest/SelfService/swops/{id}
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| id | Number | Unique identifier of the swop request. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| swops | Object[] | Object containing the swop 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. |
clockInoptional | Date | Shift start date-time as ISO-8601. |
clockOutoptional | Date | Shift end date-time as ISO-8601. |
commentoptional | String | Comment on the swop request (will be visible to other employees). |
| dayProfileDesc | String | Day profile description of the vacant shift. |
| dayProfileId | String | The day profile ID of the shift. |
| empId | String | The employee ID initiating the swop (owner of the shift). |
| empName | String | Name of employee initiating the swop (owner of shift). |
| id | Number | Unique identifier of the swop request. |
| statusMessage | String | Status message of the offer request. In correlation with 'statusCode'. |
| swopWith | Object | Object containing the shift to be swoped with. |
| attendanceDate | Date | Shift attendance date. |
clockInoptional | Date | Shift start date-time as ISO-8601. |
clockOutoptional | Date | Shift end date-time as ISO-8601. |
commentoptional | String | Comment of the swoped employee. |
| dayProfileDesc | String | Day profile description of the vacant shift. |
| dayProfileId | String | The day profile ID of the shift. |
| empId | String | The employee ID, owner of the shift to be swoped with. |
| empName | String | Employee name, owner of shift to be swoped with. |
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": {"swops": [{"id": 12345678,"statusCode": 2,"statusMessage": "Waiting for employee approval","empId": "414","empName": "John Doe","attendanceDate": "2017-06-07","dayProfileId": "SH1","dayProfileDesc": "Morning shift","clockIn": "2017-06-07T08:00:00","clockOut": "2017-06-07T16:00:00","acceptBefore": "2017-06-06","comment": "My sister is getting married. Could you help?","swopWith":{"empId": "769","empName": "Kenneth Bing","attendanceDate": "2017-06-07","dayProfileId": "EH2","dayProfileDesc": "Evening shift","clockIn": "2017-06-07T13:00:00","clockOut": "2017-06-07T22:00:00",},"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. |