ProRoster - Insert an availability.
API Url
Use it for inserting the availability for an employee.
http://localhost:16010/ProMarkREST/rest/ProRoster/availabilities
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| availabilities | Object[] | Collection of availabilities. |
| comment | String | Comment for the availability. |
| endDate | Date | The end date of the availability. |
| excludeWeekends | Logical | If TRUE the repeat pattern is not to be repeated on weekends. |
| inclDays | Logical[7] | Days to repeat. |
| intvFrom | Number | Start time of the availability. |
| intvTo | Number | End time of the availability. |
| isAllDay | Logical | Yes/No. |
| isRepeating | Logical | TRUE/FALSE. |
| repeatEvery | Number | Periods before repeat . |
| repeatType | Number | 1 = Daily, 2 = Weekly. |
| startDate | Date | The start date of the availability. |
| type | Number | The type of the availability. |
Request example:
{"request":{"data":{"availabilities": [{"startDate": "2018-09-28","endDate": "2018-09-28","intvFrom": 1000,"intvTo": 2000,"isAllDay": "No","Type": 1,"isRepeating": "Yes","repeatType": 1,"repeatEvery": 3,"excludeWeekends": "Yes","inclDays":["false","true","true","true","true","true","false"],"comment": "Doctor appointment in the morning"}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| availabilities | Object[] | Collection of availabilities. |
| comment | String | Comment for the availability. |
| empId | String | The Id of the availability. |
| endDate | Date | The end date of the availability. |
| excludeWeekends | Logical | If TRUE the repeat pattern is not to be repeated on weekends. |
| id | String | The unique id of the availability. |
| inclDays | Logical[7] | Days to repeat. |
| intvFrom | Number | Start time of the availability. |
| intvTo | Number | End time of the availability. |
| isAllDay | Logical | Yes/No. |
| isRepeating | Logical | TRUE/FALSE. |
| repeatEvery | Number | Periods before repeat . |
| repeatType | Number | 1 = Daily, 2 = Weekly. |
| startDate | Date | The start date of the availability. |
| type | Number | The type of the availability. |
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": {"availabilities": [{"id": "2163160308","empId": "892","startDate": "2018-09-28","endDate": "2018-09-28","intvFrom": 1000,"intvTo": 2000,"isAllDay": false,"type": 1,"isRepeating": true,"repeatType": 1,"repeatEvery": 3,"excludeWeekends": true,"inclDays": [false,true,true,true,true,true,false],"comment": "Doctor appointment in the morning"}]},"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. |