Skip to main content

Book a multi-customer appointment for a single service

POST 

/api/v2/branches/:branchPublicId/services/:servicePublicId/dates/:date/times/:time/book

Book a multi-customer appointment for a single service.

Example:

curl -X POST -H "Content-Type: application/json" -d '{ "title": "Meeting A", "customers": [ {"publicId":"828e247c573535d951568fada893ba9122cbfbb3e3cdda04fe5cae1d812e7df8"}, {"publicId":"402db65843b5db4167ff96e77170df96b23777c0318eef9328ccb58fcffd05c9"} ] }' http://localhost:8080/calendar-backend/public/api/v2/branches/6f27497fb5cc458ff05242ebb3a11872cd17e501eff275074439b0d1f3d8d43e/services/4c2fe2853f1f4b429b928faabc8b35e6c6a3154ff883163f4149676e4a84df00/dates/2016-11-07/times/12:00/book

If the setting to enable custom slot length is enabled in the calendar configuration, it is possible to override the calculated appointment duration (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.

@summary Book a multi-customer appointment for a single service @param branchPublicId Public ID of the Branch to book the appointment at @param servicePublicId Public ID of the Service to book the appointment for @param date The date on which to book the Appointment. Format: yyyy-MM-dd, e.g: 2013-06-12 @param time Time, in the TimeZone of the Branch, on which to book the appointment on the given date. HH:mm format, e.g. 09:00 or 13:30 @param bookingInformationDTO Wraps an optional title, notes and a nested list of com.qmatic.qp.calendar.rest.dto.CustomerDTO objects. Typically, one would either supply a fully populated Customer object for a new customer, a Customer with a populated publicId for an already identified customer or using the setting-defined 'mapping field' (externalId, customerNumber). Customers has to be unique. @return A Json object of com.qmatic.qp.calendar.rest.dto.AppointmentDTO @returnWrapped com.qmatic.qp.calendar.rest.dto.AppointmentDTO @throws com.qmatic.qp.calendar.common.CalException

Request​

Responses​