PATCH

Update Booking Policy


Updates a booking policy.

Each time the booking policy is updated, revision increments by 1. The current revision must be passed when updating the booking policy. This ensures you're working with the latest booking policy and prevents unintended overwrites.

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.
Endpoint
PATCH
https://www.wixapis.com/bookings/v1/booking-policies/{bookingPolicy.id}

Path Params
bookingPolicy.idstringRequired

ID of the booking policy.

Body Params
bookingPolicyBookingPolicyRequired

Booking policy to update.

Response Object
bookingPolicyBookingPolicy

Updated booking policy.

Update of a `bookingPolicy` object.
Request
cURL
curl -X PATCH \ 'https://wixapis.com/bookings/v1/booking-policies/7e7eac53-21c9-41fd-844b-25b287aa38ce' \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: <AUTH>' \ -d '{ "bookingPolicy": { "id": "1a426c47-0c86-46c7-8573-c7bce734f660", "revision": "1", "name": "Appointment Policy", "customPolicyDescription": { "enabled": true, "description": "To cancel, please contact us at least 48 hours in advance" }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": true, "latestCancellationInMinutes": 2880 }, "reschedulePolicy": { "enabled": false, "limitLatestReschedule": false, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": true, "capacity": 5, "reservationTimeInMinutes": 1 } }, "mask": { "paths": [ "name", "customPolicyDescription", "cancellationPolicy", "reschedulePolicy", "waitlistPolicy.capacity" ] } }'
Response
JSON
{ "bookingPolicy": { "id": "1a426c47-0c86-46c7-8573-c7bce734f660", "revision": "2", "createdDate": "2023-02-16T10:46:17.420Z", "updatedDate": "2023-02-16T11:12:51.014Z", "name": "Appointment Policy", "customPolicyDescription": { "enabled": true, "description": "To cancel, please contact us at least 48 hours in advance" }, "default": false, "limitEarlyBookingPolicy": { "enabled": true, "earliestBookingInMinutes": 43200 }, "limitLateBookingPolicy": { "enabled": true, "latestBookingInMinutes": 180 }, "bookAfterStartPolicy": { "enabled": false }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": true, "latestCancellationInMinutes": 2880 }, "reschedulePolicy": { "enabled": false, "limitLatestReschedule": false, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": true, "capacity": 5, "reservationTimeInMinutes": 30 }, "participantsPolicy": { "enabled": false, "maxParticipantsPerBooking": 1 } } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?