ProRoster - Get the availabilities in a plan.

API Url

Use it for returning the availabilities of the employees in a plan for a period of time.

GET
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{id}/availabilities

Permissions: user

Path parameters

FieldTypeDescription
idNumber

The id of the plan.

Query parameters

FieldTypeDescription
empIdsoptionalString

List of empIds separated with comma delimiter.

fromoptionalDate

The start date of the period.

tooptionalDate

The end 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.

  errorCodeNumber

Error code.

  errorMessageString

Error description.