createBookingPolicy( )


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

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Manage Bookings
Learn more about app permissions.
Method Declaration
Copy
function createBookingPolicy(
  bookingPolicy: BookingPolicy,
): Promise<BookingPolicy>;
Method Parameters
bookingPolicyBookingPolicyRequired

Booking policy to create.

Returns
Return Type:Promise<BookingPolicy>
JavaScript
import { bookingPolicies } from "@wix/bookings"; async function createBookingPolicy(bookingPolicy) { const response = await bookingPolicies.createBookingPolicy(bookingPolicy); }
Errors
400Invalid Argument

There are 2 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?