Managing calendars

Available slots need to be always kept up-to-date in order to prevent from missing booking opprotunities or overbooking.
Learn what are the ways of notifying Docplanner API about occupation of a slot.

Calendars on doctor profiles are strictly connected to addresses. Each premium address (paid one) can have a calendar activated. They aggregate slots (opens new window) which give patients availability to book a visit to a chosen professional.
# Feeding calendars
The first action after activation of an integration for a certain professional should be feeding full set of availabilities (slots) and bookings. Thanks to that operation the calendar in Docplanner should reflect the state of the partner system 1:1.
The activation process should be ran in an isolated conditions, we recommend contacting local specialists the support initial activations for clinics.
# Updating calendars
In order to maintain the most recent configuration we strongly encourage to update the doctors calendars basing on the events happening in the partner system. Each change of availability should instantly be reflected by an API call.
Currently the API supports 3 operations allowing to modify the set of available slots:
- Bookings - in case of a booking (or cancellation / reschedule) - you should use corresponding method in the API
- Breaks - in case of adding a non-specified event or a break during the day, you should use a method called calendar break to block the availability
- Availbility modification - in case of change in the schedule, you should trigger updateSlots operation in order to change the current availabilities configuration.
See detailed description of the actions and objects in Resources (opens new window) section.
# Validating schedule coverage
Recommended practice ensuring, that the setup for each doctor is performing periodic (daily/hourly) cross-check of the available slots in the schedule using getSlots (opens new window) endpoint. In order to run it, you need to call our endpoint:
https://www.{domain}/api/v3/integration/facilities/{facility_id}/doctors/{doctor_id}/addresses/{address_id}/slots
In response, the API will return the list of all currently added slots
{
"_items": [
{
"start": "2020-12-16T14:00:00+01:00"
},
{
"start": "2020-12-16T14:30:00+01:00"
}
]
}
To get the full picture, you should also perform getBookings (opens new window) and getCalendarBreaks (opens new window) operations in order to retrive all the items affecting the schedule. The result of the combination provides list of all currently available slots in the marketplace. The list should be compared to actual availabilities list in the partner system.
In case of any inconsistencies, the Docplanner configuration should be updated accordingly.