This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves appointment slots or class events that match specified filters.
Query Availability doesn't use a query builder, instead it uses API query language.
Course events can't be retrieved with this method. Follow this sample flow (SDK | REST) to check course availability.
You must include serviceId
in your query filter. For performance, also specify
both startDate
and endDate
. Refer to the
supported filters article (SDK | REST)
for a complete list of supported filters.
To limit the maximum number of appointment slots returned for each date,
specify slotsPerDay
. For example, specifying {"slotsPerDay": 3}
returns
a maximum of 3 appointment slots/class events for each day that's within the query
filter's date range.
By default, both available and unavailable appointment slots/ class events
are returned. To retrieve only available slots/events, specify
{"bookable": true}
in the filter.
Slots/events can be sorted only by startDate
. Unavailable slots/events
always appear after available ones.
Wix Bookings calculates availability differently for appointment-based services and classes.
An appointment slot is bookable
if:
startDate
is later than or equal to query.filter.startDate
.endDate
is before or equal to query.filter.endDate
.onlineBooking.enabled
is true
.A class event is bookable
if:
startDate
is later than or equal to query.filter.startDate
.endDate
is before or equal to query.filter.endDate
.remainingCapacity
is greater than 0
.onlineBooking.enabled
is true
.If you want to restrict returned class events to those with a minimum number
of remaining spots, specify openSpots
in the filter. By default, all class
events, even those with no open spot, are returned.
Due to DST, some local times may not exist or may occur twice. For example, in Santiago, Chile, on September 7, 2025, 0:05 AM doesn't exist because the clock advances from 0:00 AM to 1:00 AM.
Query Availability automatically adjusts for these gaps. Non-existent times
are moved forward by 1 hour, while existing times remain unchanged. For
instance, if you call Query Availability with a startDate
of
2025-09-07T00:00:01.000
and an endDate
of 2025-09-08T00:00:02.000
, the
adjusted query will use 2025-09-07T01:00:01.000
as the new start time.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.