This article shares basic flows your app could support. You're certainly not limited to these use cases, but it can be a helpful jumping off point as you plan your app's implementation. Your app could help site owners add bookings to their business calendar. These bookings can be for appointment based services, classes, and courses. They may also use all payment methods that are supported in Wix eCommerce in addition to Wix Pricing Plans.
Your app could display available time slots for an appointment service to the customer, let them select their slot of choice and create the related booking.
- Call Get Site Properties to retrieve the
timeZone
of the business location. - Call Query Services to retrieve all relevant services and display them to the customer. Then, save the ID of the service the customer wants to book.
- Call Query Availability.
Make sure to pass
serviceID
, the businesstimezone
, the relevantstartDate
andendDate
as filters. - Display the relevant time slots to the customer and let them select their
preferred time. Save the correspondent
slot
information. - Call Create Booking
and pass
startDate
,endDate
,timezone
,resource
andlocation
using the data from theslot
. If the call is successful, you will receive the created booking in the response. The status of the created booking isCREATED
. - Allow the customer to pay for the service, this can be done in 2 ways:
- Using Wix eCommerce
- Call Create Checkout
- Redirect the customer to the checkout page (coming soon)
- Call Create Order (coming soon)
- With your own Checkout:
- Implement your own checkout
- Call Confirm or decline Booking
- Call Create Order (coming soon) with your custom payment details
- Using Wix eCommerce
Your app could display available sessions for a class to the customer, let them select their session of choice, create the related booking, and handle the in-person payment flow.
- Call Get Site Properties to retrieve the
timeZone
of the business location. - Call Query Services to retrieve all relevant services and display them to the customer. Save the ID of the service the customer wants to book.
- Call Query Availability.
Make sure to pass
serviceID
, the businesstimezone
, the relevantstartDate
andendDate
as filters. - Display the retrieved sessions to the customer and let them select their
preferred option. Make sure to save the corresponding
sessionId
. - Call Create Booking
and pass
startDate
,endDate
,timezone
,resource
andlocation
using the data from theslot
. If the call is successful, you will receive the created booking in the response. The status of the created booking isCREATED
. - Allow the customer to pay for the service, this can be done in 2 ways:
- Using Wix eCommerce
- Call Create Checkout
- Redirect the customer to the checkout page (coming soon)
- Call Create Order (coming soon)
- With your own Checkout:
- Implement your own checkout
- Call Confirm or decline Booking
- Call Create Order (coming soon) with your custom payment details
- Using Wix eCommerce
Notes:
- If you want to skip availability checks, for example when creating a booking on behalf of the site owner, you can call the endpoint while passing the relevant
flowControlSettings
likeskipAvailabilityValidation=true
.- Passing other
flowControlSettings
lets you also override more limits such as the maximum number of participants per session, the payment methods supported for a specific service.- Don't forget about permissions. Each endpoint has their own requirements.