ProRoster - Get the availabilities for an employee.
API Url
Use it for returning the availabilities of an employee for a period of time.
http://localhost:16010/ProMarkREST/rest/ProRoster/employees/{id}/availabilities?startDate=pdaStartDate&endDate=pdaEndDate
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| id | Number | The id of the employee. |
Query parameters
| Field | Type | Description |
|---|---|---|
endDateoptional | Date | The end date of the period. |
startDateoptional | Date | The start date of the period. |
Success 200
| Field | Type | Description |
|---|---|---|
| comment | String | Comment for the availability. |
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| availabilities | Object[] | Collection of availabilities. |
| date | Date | The date for which the availability applies. |
| empId | String | The id of the employee. |
| endDate | Date | The end date of the availability. |
| endTime | Number | End time of the availability. |
| excludeWeekends | Logical | If TRUE the repeat pattern is not to be repeated on weekends. |
| id | String | The id of the availability concatenated with the date. |
| inclDays | Logical[7] | Days to repeat. |
| 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. |
| startTime | Number | Start time 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": "2163177903~\u0001791942400","date": "2019-02-01","startDate": "2019-02-01","endDate": "2019-02-10","startTime": 0,"endTime": 86400,"isAllDay": true,"type": 1,"excludeWeekends": true,"isRepeating": true,"repeatType": 1,"repeatEvery": 0,"inclDays": [false,true,true,true,true,true,false],"comment": "Doctor appointment in the morning"},{"id": "2163177907~\u0001792547200","date": "2019-02-02","startDate": "2019-02-01","endDate": "2019-02-28","startTime": 0,"endTime": 86400,"isAllDay": true,"type": 3,"excludeWeekends": true,"isRepeating": true,"repeatType": 2,"repeatEvery": 1,"inclDays": [true,false,false,false,false,false,true],"comment": "Doctor appointment in the morning"},{"id": "2163177907~\u0001792547200","date": "2019-02-03","startDate": "2019-02-01","endDate": "2019-02-28","startTime": 0,"endTime": 86400,"isAllDay": true,"type": 3,"excludeWeekends": true,"isRepeating": true,"repeatType": 2,"repeatEvery": 1,"inclDays": [true,false,false,false,false,false,true],"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. |
Error example:
HTTP/1.1 404 Not found{"response": {"data": {},"errorCode": 75,"errorMessage": "Employee does not exist"}}