Bookings: Sample Use Cases and Flows

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.

Book an Appointment

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.

  1. Call Get Site Properties to retrieve the timeZone of the business location.
  2. 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.
  3. Call Query Availability. Make sure to pass serviceID, the business timezone, the relevant startDate and endDate as filters.
  4. Display the relevant time slots to the customer and let them select their preferred time. Save the correspondent slot information.
  5. Call Create Booking and pass startDate, endDate , timezone , resource and location using the data from the slot. If the call is successful, you will receive the created booking in the response. The status of the created booking is CREATED.
  6. Allow the customer to pay for the service, this can be done in 2 ways:
    • Using Wix eCommerce
      1. Call Create Checkout
      2. Redirect the customer to the checkout page (coming soon)
      3. Call Create Order (coming soon)
    • With your own Checkout:
      1. Implement your own checkout
      2. Call Confirm or decline Booking
      3. Call Create Order (coming soon) with your custom payment details

Book a Class

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.

  1. Call Get Site Properties to retrieve the timeZone of the business location.
  2. 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.
  3. Call Query Availability. Make sure to pass serviceID, the business timezone, the relevant startDate and endDate as filters.
  4. Display the retrieved sessions to the customer and let them select their preferred option. Make sure to save the corresponding sessionId.
  5. Call Create Booking and pass startDate, endDate , timezone , resource and location using the data from the slot. If the call is successful, you will receive the created booking in the response. The status of the created booking is CREATED.
  6. Allow the customer to pay for the service, this can be done in 2 ways:
    • Using Wix eCommerce
      1. Call Create Checkout
      2. Redirect the customer to the checkout page (coming soon)
      3. Call Create Order (coming soon)
    • With your own Checkout:
      1. Implement your own checkout
      2. Call Confirm or decline Booking
      3. Call Create Order (coming soon) with your custom payment details

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 like skipAvailabilityValidation=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.
Was this helpful?
Yes
No