ONE OF:
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Book a service. Booking a service can be done by either of two methods:
- The booking is made by a customer.
- The booking is made by the business on behalf of a customer.
When the booking is done by the customer, the following takes place:
- Validation of the booking details according to the bookings policy and the service form mandatory fields.
- Payment rules are applied.
- When booking an approval required service, The booking is not charged until it is confirmed by the business.
- BySessionId: The participant added to session is marked as
"PENDING"
until the booking is confirmed by the business. - Slot: A new session is created with affected availability based on the configuration defined in the service policy.
- When booking a service with Business Locations, if a business location is provided its Id will be validated to exist in the schedule's business locations.
- When booking a service with location set to client's place, the default location is the contacts address as supplied on the form, unless the owner supplied custom address on the session location.
Note
The businessLocation.businessSchedule
object in the bookedEntity.location
object is not supported.
Permissions This endpoint requires the Read Bookings - Public data or the Manage Bookings permission scope. With the Read Bookings - Public data permission scope, a customer booking flow is applied. With the Manage Bookings permission scope, a business 'book on behalf' flow is applied.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Cancels an existing booking.
Canceling a booking causes the following changes:
- The booking status changes to
CANCELED
. - The participant is removed from the session.
- If the booking creates a session, the session that was created is deleted from the calendar.
- The participant is notified, according to the
participantNotification
properties.
When cancelling a booking on behalf of a customer, ignoreCancellationPolicy
should always be set to false to ensure that the cancellation is validated against the service's bookings policy.
Permissions This endpoint requires the Manage Bookings permission scope.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Confirms a booking request.
Site owners can set each service to automatically accept all bookings when staff are available, or manually approve or decline booking requests.
When a booking is confirmed, the following events occur:
- The booking status changes to
CONFIRMED
. - The participant status in the session changes to
APPROVED
. - Slot availability is updated.
- An offline order is created in the Wix Payment Service.
- An email notification is sent to the participant according to the
participantNotification
properties.
Permissions This endpoint requires the Manage Bookings permission scope.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deprecation Notice
This endpoint has been replaced with Booking V2's Decline Booking and will be removed on December 31, 2023. If your app uses this endpoint, we recommend updating your code as soon as possible.
Declines a pending booking request.
A service can be set to "Automatically accept all bookings when staff are available" or "Manually approve or decline booking requests" in the Online Booking Preferences page under "Additional Settings". When set to manual, the business must confirm or decline each request.
When a booking is declined, the following events occur:
- The booking status changes from
PENDING_APPROVAL
toDECLINED
. - The participant status on the session changes to
DECLINED
. - The corresponding session or participant is deleted from the calendar.
- An email notification is sent to the participant according to the
participantNotification
properties.
Permissions This endpoint requires the Manage Bookings permission scope.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Checkout a booking. When calling Checkout the following events occur:
- The availability of the requested slot, session, or schedule is validated.
- The booking payment is charged by creating a new order in Wix Payment Service, or by redeeming the given paid plan.
- When the payment is complete and according to the checkout request and the current booking's state, a participant is added to the selected session or schedule. If no session exits, new session is created in the calendar. This can happen asynchronously.
Notes
- If the requested session is locked, the session key will be needed in order to checkout the booking. See the Lock endpoint.
- The
businessLocation.businessSchedule
object in thebookedEntity.location
object is not supported.
Permissions This endpoint requires the Manage Bookings permission scope.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deprecation Notice
This endpoint has been replaced with Booking V2's Reschedule Booking and will be removed on December 31, 2023. If your app uses this endpoint, we recommend updating your code as soon as possible.
Reschedule a Booking.
When rescheduling the booking of a slot, the session on the calendar is updated.
If the session created for the original booking has no other bookings, the session will be deleted.
Participants will be notified of the rescheduling according to the settings in the participantNotification
object.
Notes
- Rescheduling the booking of a schedule is not supported.
- The
businessLocation.businessSchedule
object in thebookedEntity.location
object is not supported.
Permissions This endpoint requires the Manage Bookings permission scope.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates the customer's information for a booking
Notes:
- The whole
formInfo
object is updated for each request. Values for properties that are not included in the request will therefore be deleted. - The
businessLocation.businessSchedule
object in thebookedEntity.location
object is not supported.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Sets the number of people who actually attended the session for the given booking.
The number of attendees can be greater than 1 when the booking is made for a group of people.
Set the attendanceStatus
boolean to true
if at least 1 person attended the session.
Notes
- There is no validation on the number of attendees or on the relationship between
numberOfAttendees
andattendanceStatus
. - The
businessLocation.businessSchedule
object in thebookedEntity.location
object is not supported.
Permissions This endpoint requires the Manage Bookings permission scope.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deprecation Notice
This endpoint has been replaced with Confirm or Decline Booking and will be removed on December 31, 2023. If your app uses this endpoint, we recommend updating your code as soon as possible.
Marks a booking as fully paid.
When the business has received full payment from the customer, the booking can be marked as fully paid.
When a booking is set as paid, the following events occur:
- The
paymentDetails.state
status changes to"COMPLETE"
. - The
amountReceived
value is updated to thefinalPrice.amount
value.
You cannot mark a booking as paid if the booking status
is "PENDING_APPROVAL"
.
Note
The businessLocation.businessSchedule
object in the bookedEntity.location
object is not supported.
Permissions This endpoint requires the Manage Bookings permission scope.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.