Get a list of available booking slots
GET/calendar-backend/public/api/v2/branches/:branchPublicId/dates/:date/times
Get a list of available booking slots.
Get a list of available appointment times/slots for the selected branch, date and service(s).
IMPORTANT! The time objects returned are in the local timezone of the specified Branch! So if a slot is booked at 14:00 UTC in the appointments table, but the Branch is -0400, the slot at 10:00 will be occupied in the context of this method.
Services search criteria entered as matrix params (e.g. ;servicePublicId=firstPublicServiceId;servicePublicId=secondPublicServiceId)
Optionally, one can supply an extra matrix parameter: ;numberOfCustomers=N where N is the total number of customers on the appointment. This is used when calculating the total required timeslot length for the appointment. If omitted, it defaults to 1. If set to 0, it uses 1 customer.
Example:
curl -X GET
http://localhost:8080/calendar-backend/public/api/v2/branches/6f27497fb5cc458ff05242ebb3a11872cd17e501eff275074439b0d1f3d8d43e/dates/2016-09-06/times;
servicePublicId=4c2fe2853f1f4b429b928faabc8b35e6c6a3154ff883163f4149676e4a84df00;
servicePublicId=df20bd853e13c5b71715f3f332ec304839637ac8b34cdd3c20c9820f01377dd9;
numberOfCustomers=1
If the setting to enable custom slot length is enabled in the calendar configuration, it is possible to override the calculated time slot length (which is normally based on service times and no of customers). To do this add a matrix parameter "customSlotLength" to the request, which specifies the booking time in minutes. Simply add e.g. ";customSlotLength=60" to the URL in the example above. The REST endpoint will throw an error if an attempt is made to use customSlotLength without the setting being enabled.
Request
Responses
- 200
A Json list of String A Set of times in HH:mm format, where each one defines a bookable start time for an appointment that's available given Capacities, Blocks and existing Appointments on Resources.