With the Wix Bookings V2 API you can manage bookings for a site's services. The booking object holds information about the customer and the session or schedule they have booked. You can then use the eCommerce APIs (coming soon) to handle the checkout and payment flow.
The Wix Bookings V2 API allows your app to:
- Create new bookings (coming soon)
- Retrieve existing bookings
- Manage the booking's life cycle
You can read more about:
- The Wix Bookings service catalog
- Using the Wix Bookings waitlist
- Customer payments using Wix Pricing Plans
- Booking: Information about the service that the customer has booked. Includes details about the time, location, participants, and payment.
- Booking Status: Information about the booking's life cycle.
CREATED
: The booking has been created, but doesn't yet appear in the business calendar. You need to create a booking before you can start the checkout flow in eCommerce (coming soon).CONFIRMED
: The site owner has confirmed the booking and it appears in the business calendar.PENDING
: The booking is waiting to be confirmed or declined by the owner and is displayed in the business calendar. You can't manually set bookings asPENDING
via an API. Bookings are automatically set asPENDING
when an eCommerce order related to the booking has been created (coming soon).WAITING_LIST
: The booking is pending on a waiting list. You must use the Waitlist APIs to create bookings in statusWAITING_LIST
. You can't change a booking's status fromCREATED
toWAITING_LIST
with the Bookings V2 APIs.DECLINED
: The booking has been declined by the site owner.- You can manually decline a booking with the Decline Booking endpoint.
- Bookings are automatically declined when an eCommerce order has been declined or a double booking happened for free bookings.
CANCELED
: The booking has been canceled by the site owner or the customer. You can cancel bookings with the API.
- Double booked:
A double booking can happen in case of 2 or more simultaneous eCommerce checkout
processes or if the site owner manually accepts bookings that exceed the
service's capacity limit.
- When a double booking happens for paying customers, the
doubleBooked
boolean is set totrue
for the second booking and the owner is notified. They must then manually resolve the situation. - When a double booking happens for free services, the second
booking's status is set to
DECLINED
while the first booking is retained.
- When a double booking happens for paying customers, the
- Service: Business offering. For example, a fitness studio may offer a 1-hour yoga class, a 45 minute HIIT training session, and a 30 minute 1-on-1 personal training. Learn more about services.
- Variant: Unique variation of the service. Each service variant may have a different price. Read more about service variants.
- Availability: Free time on a schedule that customers can book.
You can read more about
Query Availability.
The Create Booking (coming soon) and
Reschedule Booking
endpoints check if a slot or schedule is available, unless you pass
skipAvailabilityValidation
in the body of the request. Confirm Booking doesn't check availability. Instead, the availability is checked during the eCommerce payment flow (coming soon). - Schedule: Entity that holds availability information. A schedule can either belong to a resource (for example, a staff member) or a service. When creating a booking (coming soon) for a course, you need to pass the service's schedule in the body of the request.
- Session: An occupied period of time on a schedule. When
creating a booking (coming soon)
for a class you need to pass the service's relevant existing session as
slot
in the body of the request. - Slot: An available period of time in a schedule that can be booked by a customer. When creating a booking (coming soon) for an appointment you need to pass the relevant slot in the body of the request.
- Deposit: Amount the customer must pay immediately when checking out the booking.
- Visitor: Anyone who isn't registered as a member or hasn't logged in to the Wix site. If a visitor creates a booking they're added as a contact.
- Member: Someone who is a registered member in the Wix site and has a login.
- Wix Pricing Plans: A pre-paid bundle of services or a membership that provides access to certain services.
- The
participantNotification
field holds only information about the last message sent to the customer. It also doesn't include details which type of message has been sent. - You must use the Waitlist APIs
to create bookings in status
WAITING_LIST
. You can't change a booking's status fromCREATED
toWAITING_LIST
with the Bookings V2 APIs.
With Bookings Confirmation service, you can ensure that checkout completion is handled in a way that prevents double bookings.
Once the checkout is complete, call the confirmOrDeclineBooking
function to apply it to the booking.
Typically, the booking status will be updated to CONFIRMED
, and you'll see it on the calendar.
However, in some cases, such as when over-booking could occur, the booking may be declined.
For more information about the ConfirmOrDeclineBooking
endpoint, please refer to its documentation.
- Booking: Information about the service that the customer has booked.
Includes details about the time, location, participants, and price.
- Service: Online or in-person business offerings, such as courses and private sessions. For
example, a fitness studio may offer a
1-hour yoga class, a 45 minute HIIT training session, and a 30 minute 1-on-1
personal training. Bookings offers 3 types of services:
- Appointments: Appointments take place whenever a customer books a specific time slot. For example, your hair salon may be open for business from 9:00 AM to 7:00 PM and a customer can book a session at any available time during the day.
- Classes: Classes can be scheduled on different days, at different times, with different resources, such as staff members. Customers can sign up for single sessions or a class's recurring sessions. For example, a language school offers a beginner's Spanish class every Monday at 8:00 PM. Clients can join the session they want and don't have to commit to attending all sessions.
- Courses: A limited number of sessions for the same service that starts and ends on a particular day. Customers sign up for the entire course and not one session. For example, a 12-session introductory course to Pilates, starting on February 1st and ending on March 17th.
- Service: Online or in-person business offerings, such as courses and private sessions. For
example, a fitness studio may offer a
1-hour yoga class, a 45 minute HIIT training session, and a 30 minute 1-on-1
personal training. Bookings offers 3 types of services:
- Schedule: A collection of all sessions that belong to the same class, course, appointment, or resource. Schedules also comprise available slots that can still be booked.
- Session: An occupied period of time in a schedule. Sessions are the building blocks of appointments, classes, and courses. Each of these types of services comprise sessions. The collection of related sessions for a service represent the service's schedule.
- Slot: An available period of time in a schedule that can be booked by a customer. While this includes existing sessions that are available for booking, it can also represent a period of time that can be booked based on the availability of a resource, such as a barber with appointments of 30 minutes each that are open for booking every weekday between 8:00 - 17:00. These slots are calculated according to the constraints of the schedule.
- Calendar: General overview about the availability and bookings of the business, including its services and resources. Manage your appointments, classes and courses on the calendar.
- Resource: Business asset like a staff member, room, or equipment that's needed to provide a service.
- Availability: Free time on a schedule that customers can book.
You can read more about
Query Availability.
The Create Booking and
Reschedule Booking
endpoints check if a slot or schedule is available, unless you pass
skipAvailabilityValidation
in the body of the request. Confirm Booking doesn't check availability. Instead, the availability is checked during the ecom payment flow(coming soon) and with Confirm or Decline Booking. - Double Bookings: Double bookings occur if the total number of bookings for a period of time is greater than the number of spots or resources for the same period of time. Regarding sessions or a schedule, when it does not have enough capacity to accommodate the booking's participants, and for appointments bookings when the same staff member and service overlap.
The following flow presents how Confirm Or Decline Booking
determines the booking status.
Calling a checkout after creating a booking, is optional, Confirm or Decline Booking
can be called after Create Booking
- Whether the availability check is required If
skipAvailability
istrue
, it will skip the check and it will never be adoubleBooking
. - Whether the booking is paid for.If the payment status is
PAID
orPARTIALLY_PAID
, the booking is confirmed regardless of thedoubleBooking
parameter. - Wether the booking requires business confirmation. Instead of
CONFIRMED
the status is set toPENDING
. This happens since it needs to always be manually approved by the owner. You can bypass the confirmation check by setting theskipBusinessConfirmation
property totrue
when creating a booking.
- "CREATED" - The booking was created.
- "UPDATED" - The booking was updated.
- "CONFIRMED" - The booking was confirmed and appears on the bookings calendar. A booking can be manually confirmed using the Confirm Or Decline API. A booking can be automatically confirmed when the following requirements are met:
- The service is configured as automatically confirmed.
- The system invoked the eCommerce checkout API and created an order.
- "CANCELED" - The booking has been canceled and synced to the bookings calendar. The booking can be canceled using Cancel Booking API.
- "PENDING" - The booking is waiting to be confirmed or declined by the owner and the booking is synced to the bookings calendar. Bookings can be manually set as PENDING using the setAsPending API, by those with Manage Booking Status permissions scopes. Bookings can be automatically set as PENDING when the following requirements are met:
- The service is configured as manually confirmed.
- Invoking the eCommerce checkout API and an order has been created.
- "WAITING_LIST" - The booking is on a waiting list.
- "DECLINED" - The booking was declined by the owner and synced to the Bookings calendar. Bookings can be manually declined using the Decline Booking API by those with Manage Booking Status permissions scopes. Booking can be automatically declined when one of the following requirements are met:
- Invoking the eCommerce checkout API and the order declined event has been sent.
- Invoking the eCommerce checkout API and order approved event has been sent, but the booking is offline and the booking causes a double booking.
- "NOT_PAID" The booking is not paid for.
- "PAID" The booking is fully paid.
- "PARTIALLY_PAID" The booking is partially paid.
- "REFUNDED" The booking is refunded.
- "EXEMPT" The booking is free of charge.
ONE OF:
Creates a booking.
To create a booking for an appointment or a session of a class, pass a booking with the relevant slot
.
To create a booking for the entire course, pass a booking with the relevant schedule
.
You can use the Query Availability endpoint to check the availability beforehand.
If you create a booking for an existing session, we recommend that you only pass slot.sessionId
.
Then, any specified slot details are calculated.
If you create a booking for a new session, we recommend to call
Query Availability
first.
Then, pass the retrieved availability.slot
object as the BookedEntity.Slot of the booking in the request.
Bookings are created with a status of CREATED
.
CREATED
bookings don't appear on the business calendar and don't affect a related schedule's availability.
To create a booking with a given status, pass a booking with the wanted status. This is only permitted for site Owners.
You can pass a participantNotification.message
to notify the customer of the booking with a message.
It's also necessary to pass participantNotification.notifyParticipants
as true
to send the message.
You can pass sendSmsReminder
as true
, if you want an SMS reminder to be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.
When creating a booking you must pass either participantsChoices
or totalParticipants
. If you pass participantsChoices
, all the
provided choices must exist for the service, otherwise the call returns an INVALID_SERVICE_CHOICES
error.
When creating a booking, you can pass selectedPaymentOption
.
This specifies which payment method the customer plans to use.
But it's possible for them to later use another supported payment method.
You can skip the checkout and payment flow if you call Confirm Or Decline Booking otherwise, after you create the booking, you can use the Wix eCommerce APIs (coming soon) for the checkout and payment flow or use a different service for checkout.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Creates multiple bookings.
See Create Booking documentation. If for any of the bookings required fields were not passed on the request or if the caller doesn't have the required permissions to create such booking, the call fails. If the request contains unavailable bookings, the call completes successfully but the unavailable bookings are not created and are not considered as failures in the response.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Reschedules a booking to a different slot or session.
You can only reschedule bookings for appointments or classes, you can't reschedule course bookings.
The old session is removed from the calendar and the new session is added.
If you reschedule a booking for a class session the new session must be an existing session for the same class.
You can pass a participantNotification.message
to notify the customer of
the rescheduling. You also need to pass participantNotification.notifyParticipants
as true
to actually send the message.
In case the service has
variants, you can call this endpoint to update the booking's totalParticipants
or participantsChoices
.
If you provide participantsChoices
, all of the provided choices must exist for
the service. Otherwise, the call returns an INVALID_SERVICE_CHOICES
error.
If you omit participantsChoices
in the request, the existing choices are
kept and not replaced with an empty object.
In case you want to reschedule a booking on behalf of a customer, we recommend
to pass flowControlSettings.ignoreReschedulePolicy
as false
. This
ensures that the rescheduling is validated against the service's rescheduling
policy.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Confirms a booking and changes the booking status to CONFIRMED
.
You can only confirm bookings that have a status of PENDING
, CREATED
, or WAITING_LIST
.
Calling this endpoint doesn't check whether a slot or schedule is still available at this time.
For appointment services the slot may become unavailable, depending on the
service's
policy.bookingApprovalPolicy.requestsAffectsAvailability
.
Calling this endpoint also changes the
session's
participants.approvalStatus
to APPROVED
.
You can pass a participantNotification.message
to notify the customer of
the confirmation. You also need to pass participantNotification.notifyParticipants
as true
to actually send the message.
If you don't define participantNotification.message
, the participant notification for the booking defaults to the one specified when the booking was created.
You can pass sendSmsReminder
as true
if you want an SMS reminder to be sent to the phone number specified in the ContactDetails
24 hours before the session starts.
If you don't define the reminder, the SMS reminder for the booking defaults to the one specified when the booking was created.
If you provide paymentStatus
, this status is applied to the booking. Otherwise, the payment status for the booking remains unchanged.
Bookings are automatically confirmed when both of the following conditions are met:
- The service is configured to automatically confirm
- The eCommerce (coming soon) order has been approved.
The slot's or schedule's availability is checked just before confirming the booking as part of the automatic flow.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Updates the extended fields for a booking.
Extended fields must first be configured in the Wix Developers Center.
Learn more about extended fields.
Permission Scopes
For app development, you must have one of the following permission scopes:Declines a booking and changes the booking status to DECLINED
.
You can only decline bookings that have a status of PENDING
, CREATED
, or WAITING_LIST
.
Calling this endpoint also changes the
session's
participants.approvalStatus
to DECLINED
.
You can only decline bookings for services that require the owner's manual
approval for bookings and that have a status of PENDING
.
You can pass a participantNotification.message
to notify the customer of
the decline. You also need to pass participantNotification.notifyParticipants
as true
to actually send the message.
If you provide paymentStatus
, this status is applied to the booking. Otherwise, the payment status for the booking remains unchanged.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Cancels a booking.
The booking status changes to CANCELED
.
If the booking was for an appointment, the corresponding session is deleted from the business calendar.
If the booking was for a class or course, the participants are removed from the class session or the course. But the course or class session remains on the business calendar.
You can pass a participantNotification.message
to notify the customer of
the cancelation. You also need to pass participantNotification.notifyParticipants
as true
to actually send the message.
In case you want to cancel a booking on behalf of a customer, we recommend
to pass flowControlSettings.ignoreCancellationPolicy
as false
. This
ensures that the cancelation is validated against the service's cancelation
policy.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Updates the number of participants for a booking.
You can only update the number of participants for class and course bookings, you can't update it for appointment bookings.
Calling this endpoint also changes the
session's
totalNumberOfParticipants
.
When updating the number of participants for a booking you must pass either
participantsChoices
or totalParticipants
. If you pass participantsChoices
for services that have variants,
all of the provided choices must exist for the service. Otherwise, the
call returns an INVALID_SERVICE_CHOICES
error.
Permission Scopes
For app development, you must have one of the following permission scopes:Use Confirm Or Decline Booking
to determine if the booking is valid, payment is received, and the booking can be processed.
Call Confirm Or Decline Booking
after checkout or after calling Create Booking
to verify the booking.
- If a session is valid and payment is received, the booking is visible on the calendar.
- If a session is double booked,
Confirm Or Decline Booking
can catch this and decline the duplicate booking, the booking is not visible on the calendar.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Triggered when a booking is created.
Event Body
Triggered when a booking is canceled.
Event Body
Triggered when a booking is rescheduled.
Event Body
Triggered when a booking is confirmed.
Event Body
Triggered when a booking is declined.
Event Body
Triggered when a booking is updated.
Event Body
Triggered when the number of participants is updated.