ProRoster - Update a demand
API Url
Use it for updating a Demand .
http://localhost:16010/ProMarkREST/rest/ProRoster/demands
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| demands | Object[] | List of plan Demands. |
approvalGroupoptional | Object[] | |
idoptional | String | Id of the approvalGroup. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
assignmentMethodoptional | Object[] | |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
methodoptional | String | Assignment methode Automatic = "A" or Manual "M". |
attendanceTimeoptional | Object[] | Attendance time interval. |
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. |
backColoroptional | String | BackGround color in HEX without #. |
baseDemandIdoptional | Number | Id of the base demand. |
categoryoptional | Object[] | |
| id | String | Id of the category. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| date | Date | The date of the plan demand. |
dayProfileoptional | Object[] | |
idoptional | String | |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
daysBeforeoptional | Object[] | |
daysoptional | Number | Accept days before shift takes place. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
departmentoptional | Object[] | |
idoptional | String | Id of the department. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
descriptionoptional | String | Description of the base demand. |
foreColoroptional | String | ForeGround color in HEX without #. |
groupoptional | Object[] | |
idoptional | String | Id of the group. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
idoptional | Number | The Id of the plan demand. |
ignoreDayProfileoptional | Object[] | |
| isLocked | Boolean | Is the attribute locked. |
| value | Boolean | |
maximumBidsoptional | Object[] | |
| amount | Number | Number of employees to bid in. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
nameoptional | String | The name of the plan demand. |
normalTimeoptional | Object[] | Normal time interval for variable day profiles. |
endTimeoptional | Number | End time of the interval in seconds. |
startTimeoptional | Number | Start time of the interval in seconds. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| planId | Number | Id of the plan currently working on. |
qualificationSetupoptional | Object[] | |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
qualificationsoptional | Object[] | |
| id | Number | Id of the employee qualification. |
| order | Number | |
| primary | Boolean | |
| requiredEmployees | Object[] | |
| amount | Number | Number of employees |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
versionoptional | Number | Version of the plan demand. |
Request example:
HTTP/1.1 200 OK{"request": {"data": {"demands": [{"id": 2153900338,"baseDemandId": 2153905338,"planId": 2153900339,"date": "18-02-2018","name": "Bla","description": "blah, blah, blah, blah, blah","foreColor": "123400","backColor": "567800","version": 1,"attendanceTime": [{"startTime": 0,"endTime": 3600,"isRequired": false,"isLocked": true}],"normalTimeInterval": [{"startTime": 0,"endTime": 3600,"isRequired": false,"isLocked": true}],"dayProfile": [{"id": "DAY","isRequired": false,"isLocked": true}],"requiredEmployees": [{"amount": 3,"isRequired": false,"isLocked": true}],"department": [{"id": "0000007215","isRequired": false,"isLocked": true}],"assignmentMethod": [{"method": "A","isRequired": false,"isLocked": true}],"group": [{"id": "1","isRequired": false,"isLocked": true}],"approvalGroup": [{"id": "01","isRequired": true,"isLocked": true}],"maximumBids": [{"amount": 9,"isRequired": false,"isLocked": true}],"category": [{"id": "02","isRequired": false,"isLocked": true}],"ignoreDayProfile": [{"value": true,"isLocked": true}],"daysBefore": [{"days": 2,"isRequired": false,"isLocked": true}],"qualifications": [{"id": 2153900339,"empQualId": "3","primary": true,"order": 1,"isRequired": true,"isLocked": true}]}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
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{"request": {"data": {"demands": [{"id": 2153900338,"baseDemandId": 2153905338,"planId": 2153900339,"counter": 2,"date": "18-02-2018","name": "Bla","description": "blah, blah, blah, blah, blah","foreColor": "123400","backColor": "567800","version": 1,"normalTimeInterval": [{"startTime": 0,"endTime": 3600,"isRequired": false,"isLocked": true}],"dayProfile": [{"id": "DAY","isRequired": false,"isLocked": true}],"requiredEmployees": [{"amount": 3,"isRequired": false,"isLocked": true}],"department": [{"id": "0000007215","isRequired": false,"isLocked": true}],"assignmentMethod": [{"method": "A","isRequired": false,"isLocked": true}],"group": [{"id": "1","isRequired": false,"isLocked": true}],"approvalGroup": [{"id": "01","isRequired": true,"isLocked": true}],"maximumBids": [{"amount": 9,"isRequired": false,"isLocked": true}],"category": [{"id": "02","isRequired": false,"isLocked": true}],"daysBefore": [{"days": 2,"isRequired": false,"isLocked": true}],"qualifications": [{"id": 2153900339,"empQualId": "3","primary": true,"order": 1,"isRequired": true,"isLocked": true}],"notes": [{"id": 2163396278,"text": "bring coffee in the morning","isEmpNote": true},{"id": 2163396279,"text": "no breaks during this shift"}]}]},"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. |