This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Sets a booking policy as the default.
Also updates the site's current default policy by setting its default
attribute to false
. If the provided policy is already the site's
default, the call succeeds without changing any bookingPolicy
object.
You can only call this method when authenticated as a Wix app or Wix user identity.
function setDefaultBookingPolicy(
bookingPolicyId: string,
): Promise<SetDefaultBookingPolicyResponse>;
ID of the booking policy that's set as default.
import { bookingPolicies } from "@wix/bookings";
async function setDefaultBookingPolicy(bookingPolicyId) {
const response =
await bookingPolicies.setDefaultBookingPolicy(bookingPolicyId);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.