ProSchedule - Swop two days.
API Url
Use it for swapping two days.
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{id}/swop-demands
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| id | Number | The plan id. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| date | Date | The day for which the swapping is performed. |
| firstEmpId | String | First employee's id for swop. |
| secondEmpId | String | Second employee's id for swop. |
Request example:
{"request":{"data":{"swop":{"date": "2019-10-31","firstEmpId": "1327","secondEmpId": "1326"}}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| assignedDemands | Object[] | |
approvalGroupoptional | Object[] | |
descriptionoptional | String | Description of the approvalGroup. |
idoptional | String | Id of the approvalGroup. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| backColor | String | BackGround color in HEX without #. |
categoryoptional | Object[] | |
descriptionoptional | String | Description of the category. |
idoptional | String | Id of the category. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| date | Date | The date of the assigned demand. |
dayProfileoptional | Object[] | The day profile object. |
backColoroptional | String | BackGround color. |
| description | String | Description of the day profile. |
endTimeoptional | Number | Normal time end of day profile. |
foreColoroptional | String | ForeGround color. |
idoptional | String | Day profile ID. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| isVariable | Boolean | True if day profile is variable. |
startTimeoptional | Number | Normal time start of day profile. |
| demandId | Number | The Id of the plan demand the assigned demand originates from. |
departmentoptional | Object[] | |
descriptionoptional | String | Description of the department. |
idoptional | String | Id of the department. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| description | String | Description of the demand. |
| empId | String | The Id of the employee assigned to a demand. |
| foreColor | String | ForeGround color in HEX without #. |
groupoptional | Object[] | |
descriptionoptional | String | Description of the group. |
idoptional | String | Id of the group. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| id | Number | The unique id of the assigned demand. |
| isPublished | Boolean | False = the assigned demand is not published. True = the assigned demand is published. |
| isTask | Boolean | True if demand is task, false if not. |
| name | String | The name of the demand. |
normalTimeoptional | Object[] | Normal time interval for variable day profiles. |
endTimeoptional | Number | End time of the interval in seconds. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
startTimeoptional | Number | Start time of the interval in seconds. |
| planId | Number | The Id of the plan. |
| version | Number | Version number of the assigned demand. |
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": {"assignedDemands": [{"id": 2154019413,"empId": "893","date": "2021-09-29","demandId": 1234567890,"planId": 2153977956,"name": "BaseDemandDeTestBlah","description": "same","foreColor": "678DB6","backColor": "678DB6","version": 1,"isPublished": false,"normalTime": [{"startTime": 0,"endTime": 0,"isRequired": false,"isLocked": false}],"dayProfile": [{"id": "Morning","description": "Morning shift","isVariable": false,"foreColor": "","backColor": "","isRequired": false,"isLocked": false}],"department": [{"id": "Welders","description": "Welders specialists","isRequired": false,"isLocked": false}],"group": [{"id": "Group1","description": "Group 1","isRequired": false,"isLocked": false}],"approvalGroup": [{"description": "","isRequired": false,"isLocked": false}],"category": [{"description": "","isRequired": false,"isLocked": false}]"ignoreDayProfile": [{"value": true,"isLocked": true}]}]},"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. |