POST

Create 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.

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.notifyParticipantsas 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.

Permissions
Manage Bookings - all permissions
Manage Bookings
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/bookings/v2/bookings

Errors
400Invalid Argument

There are 2 errors with this status code:

403Permission Denied

There are 2 errors with this status code:

428Failed Precondition

There are 12 errors with this status code:

See the entire list and learn more about Wix errors.

Event TriggersThis method triggers the following events:
Did this help?