This article presents a use case and corresponding sample flow that you can support. It provides a useful starting point as you plan your implementation.
This flow shows what happens when a customer views available booking times, including when they select service variants or add-ons.
Prerequisite: Resources must exist for the services being booked. The merchant may also have configured services with service options and variants or add-ons.
services.serviceId for each service. If the customer made choices, the request also includes services.customerChoices with:
durationInMinutes: The duration selected by the customer from the service's options and variants.addOnIds: IDs of selected add-ons.duration, bufferTimeInMinutes, splitIntervalInMinutes, resourceTypes, and locations.duration.defaultInMinutes, your implementation must calculate the correct value based on the customer choices. The Time Slots API forwards customer choices to your implementation without processing them, so your implementation is responsible for using them to calculate the correct duration:
addOnIds: Calculate the total duration as the service's base duration from service.schedule.availabilityConstraints.sessionDurations plus the durationInMinutes of all selected add-ons.durationInMinutes: Use it directly as the slot duration.addOnIds and durationInMinutes: The durationInMinutes value already includes the service duration plus all selected add-on durations. Use it directly.service.schedule.availabilityConstraints.sessionDurations.This flow shows what happens when a customer views available booking times for a service that supports a bookable duration range. Instead of fixed durations, the customer selects how long they want to book within a minimum and maximum range.
Prerequisite: Resources must exist for the services being booked.
services.serviceId for the service.duration and durationUnit. For an hourly service:
duration.defaultInMinutes: The minimum bookable duration in minutes. For example, 60 for a 1-hour minimum. Wix uses this to calculate available start times.durationUnit.unitType: HOURdurationUnit.minDuration: Minimum bookable duration in minutes. For example, 60 for a 1-hour minimum.durationUnit.maxDuration: Maximum bookable duration in minutes. For example, 240 for a 4-hour maximum.duration.defaultInMinutes to calculate available start times and displays them to the customer.durationUnit to calculate available end times based on the maximum duration and resource availability.For daily services, return only durationUnit and leave duration empty. Set durationUnit.unitType to DAY and specify minDuration and maxDuration in days. For example, 1 for a 1-day minimum and 5 for a 5-day maximum. Wix then calculates availability as full-day windows instead of time slots.
Last updated: 1 July 2026