Returns unique dates according to the Resource availability, capacities and capacity blocks of the specified branch…
GET/calendar-backend/public/api/v2/branches/:branchPublicId/dates
Returns unique dates according to the Resource availability, capacities and capacity blocks of the specified branch and services. This call will calculate dates that can fit an appointment for the services defined within the call.
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;
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 time 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 dates as yyyy-MM-dd strings.