ProRoster - Get the availabilities for an employee.

API Url

Use it for returning the availabilities of an employee for a period of time.

GET
http://localhost:16010/ProMarkREST/rest/ProRoster/employees/{id}/availabilities?startDate=pdaStartDate&endDate=pdaEndDate

Permissions: user

Path parameters

FieldTypeDescription
idNumber

The id of the employee.

Query parameters

FieldTypeDescription
endDateoptionalDate

The end date of the period.

startDateoptionalDate

The start date of the period.

Success 200

FieldTypeDescription
      commentString

Comment for the availability.

responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    availabilitiesObject[]

Collection of availabilities.

      dateDate

The date for which the availability applies.

      empIdString

The id of the employee.

      endDateDate

The end date of the availability.

      endTimeNumber

End time of the availability.

      excludeWeekendsLogical

If TRUE the repeat pattern is not to be repeated on weekends.

      idString

The id of the availability concatenated with the date.

      inclDaysLogical[7]

Days to repeat.

      isAllDayLogical

Yes/No.

      isRepeatingLogical

TRUE/FALSE.

      repeatEveryNumber

Periods before repeat.

      repeatTypeNumber

1 = Daily, 2 = Weekly.

      startDateDate

The start date of the availability.

      startTimeNumber

Start time of the availability.

      typeNumber

The type of the availability.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

HTTP/1.1 404 Not found
{
"response": {
"data": {},
"errorCode": 75,
"errorMessage": "Employee does not exist"
}
}