Booking Object

Attributes
idstringformat GUID
Booking ID.

bookedEntityobject
An object describing the entity that was booked.

bookedResourcesArray <BookedResource>
A list of booked resources. Currently, only one is supported. The booked resource would generally be the staff-member giving the session.

formInfoobject
Form information submitted when booking. FormInfo contains contact details, participants, and other form fields, set up for the service.

paymentDetailsobject
Payment Details.

statusstring
7 supported values:
UNDEFINEDPENDING_CHECKOUTCONFIRMEDCANCELEDPENDINGPENDING_APPROVALDECLINED
Booking status.

createdstringformat date-time
Date and time when the booking was created.

createdDatestringformat date-time
Date and time the booking was created.

attendanceInfoobject
Attendance information.

externalUserIdstring
External ID provided by the client app on creation.

bookingSourceobject
An object describing the platform and application that made the booking.

ONE OF:


Was this helpful?
Yes
No

PostBook

Developer Preview

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:

  1. The booking is made by a customer.
  2. 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.

Endpoint
POST
https://www.wixapis.com/bookings/v1/bookings/book

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostCancel Booking

Developer Preview

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.

Endpoint
POST
https://www.wixapis.com/bookings/v1/bookings/{id}/cancel

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostConfirm Booking

Developer Preview

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.

Endpoint
POST
https://www.wixapis.com/bookings/v1/bookings/requests/{id}/confirm

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostDecline Booking

Developer Preview

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 to DECLINED.
  • 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.

Endpoint
POST
https://www.wixapis.com/bookings/v1/bookings/requests/{id}/decline

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostCheckout

Developer Preview

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 the bookedEntity.location object is not supported.

Permissions This endpoint requires the Manage Bookings permission scope.

Endpoint
POST
https://www.wixapis.com/bookings/v1/bookings/{bookingId}/checkout

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostReschedule Booking

Developer Preview

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 the bookedEntity.location object is not supported.

Permissions This endpoint requires the Manage Bookings permission scope.

Endpoint
POST
https://www.wixapis.com/bookings/v1/bookings/{bookingId}/reschedule

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostUpdate Customer Info

Developer Preview

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 the bookedEntity.location object is not supported.
Endpoint
POST
https://www.wixapis.com/bookings/v1/bookings/{bookingId}/updateCustomerInfo

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostSet Attendance

Developer Preview

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 and attendanceStatus.
  • The businessLocation.businessSchedule object in the bookedEntity.location object is not supported.

Permissions This endpoint requires the Manage Bookings permission scope.

Endpoint
POST
https://www.wixapis.com/bookings/v1/bookings/{bookingId}/setAttendance

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostMark Booking As Paid

Developer Preview

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 the finalPrice.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.

Endpoint
POST
https://www.wixapis.com/bookings/v1/bookings/{bookingId}/markAsPaid

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

Booking Notification

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
reasonstring
16 supported values:
UNDEFINEDOWNER_BOOKEDVISITOR_BOOKING_REQUEST_CREATEDVISITOR_BOOKING_CONFIRMEDOWNER_CANCELEDOWNER_UPDATED_SESSIONMEMBER_CANCELLEDOWNER_UPDATED_SCHEDULEOWNER_RESCHEDULED_BOOKINGMEMBER_RESCHEDULED_BOOKINGOWNER_UPDATED_ATTENDANCEOWNER_CONFIRMED_BOOKING_REQUESTOWNER_DECLINED_BOOKING_REQUESTOWNER_CANCELLED_SESSION_IN_SETOWNER_SET_AS_PAIDVISITOR_BOOKING_DECLINED

bookingobject

notifyParticipantsboolean
deprecated, use participant_notification

previousBookingobject
in case of create this field is empty.

participantNotificationobject
Whether to notify participants about the change and an optional custom message

bookedSessionIntervalsChangedboolean
relevant only on OWNER_UPDATED_SCHEDULE events

sessionobject
relevant only for OWNER_UPDATED_SESSION and OWNER_CANCELLED_SESSION_IN_SET

previousSessionobject
relevant only for OWNER_UPDATED_SESSION

sendSmsReminderboolean
When value is set to True, an SMS reminder would be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.
Was this helpful?
Yes
No