About the Booking Policies API

Booking policies are a set of rules that define how customers can book a service, including:

  • How early or late customers can book sessions.
  • How late customers can cancel or reschedule sessions.
  • How many participants customers can add to a single booking.

With the Wix Bookings Policies API, you can:

See Setting Up Your Booking Policies for more details.

Before you begin

It’s important to note the following points before starting to code:

  • Every site with Wix Bookings comes with a default booking policy that you can update but can't delete.
  • Be aware that daylight saving time can affect booking policies. For example, if the time shifts an hour forward during a cancellation window, customers have 1 hour less to cancel their booking.

Use cases

Terminology

  • Booking policy: A set of rules that determine how customers can book a service, including timeframes for booking, canceling, or rescheduling.
  • Default policy: The booking policy that automatically applies to all services on the site. While you can't delete the default policy, you can update it or designate another policy as the default.

For a comprehensive glossary of Wix Bookings terms, see Terminology.

Did this help?

Booking Policies API: Sample Use Cases and Flows

This article shares some possible use cases your app could support, as well as a sample flow that could support each use case. This can be a helpful jumping off point as you plan your app's implementation.

Assign a booking policy to an existing service

Your app could allow the business owner to assign a booking policy to one of their services.

To assign a booking policy to a service:

  1. Call Query Services to retrieve all relevant services and display them to the business owner. Make sure to save id and revision of the service for which the owner wants to change the booking policy.
  2. Use Query Booking Policy to retrieve all relevant booking policies and display them to the owner. Let them pick one and save the bookingPolicy.id.
  3. Optional: Allow the owner to create a new policy if they can't find a policy that meets all their needs by calling Create Booking Policy. Let the owner input all relevant parameters for the policy and save the ID of the new policy.
  4. Call Update Service and provide service.id, service.revision, and service.booking.policy.id.

Change the default policy

Your app could allow the user to set a new default booking policy for their site.

To change the default policy:

  1. Call Query Booking Policy to retrieve all relevant booking policies and display them to the business owner. Let them choose a policy and save its ID.
  2. Optional: Allow the owner to create a new policy if they can't find a policy that meets all their needs by calling Create Booking Policy. Let the owner input all relevant parameters for the policy and save the ID of the new policy.
  3. Call Set Default Booking Policy and pass the relevant bookingPolicy.id.
Did this help?

Booking Policy: Filtering and Sorting

Query Booking Policies and Count Booking Policies allow you to filter based on properties of the bookingPolicy object.

Filtering

Specify the filter object in the following format:

Copy
{ "filter": { "fieldName": { "$eq": "value" } } }

The following table shows field support for filters and sorting for the bookingPolicy object:

FieldSupported FiltersSortable
id$eq, $ne, $inSortable
name$eq, $ne, $startsWithSortable
custom_policy_description.enabled$eq, $neSortable
custom_policy_description.description$eq, $ne, $startsWithSortable
limit_early_booking_policy.enabled$eq, $neSortable
limit_early_booking_policy.earliest_booking_in_minutes$eq, $ne, $lt, $lte, $gt, $gte, $in, $ninSortable
limit_late_booking_policy.enabled$eq, $neSortable
limit_late_booking_policy.latest_booking_in_minutes$eq, $ne, $lt, $lte, $gt, $gte, $in, $ninSortable
book_after_start_policy.enabled$eq, $neSortable
cancellation_policy.enabled$eq, $neSortable
cancellation_policy.limit_latest_cancellation$eq, $neSortable
cancellation_policy.latest_cancellation_in_minutes$eq, $ne, $lt, $lte, $gt, $gte, $in, $ninSortable
reschedule_policy.enabled$eq, $neSortable
reschedule_policy.limit_latest_reschedule$eq, $neSortable
reschedule_policy.latest_reschedule_in_minutes$eq, $ne, $lt, $lte, $gt, $gte, $in, $ninSortable
waitlist_policy.enabled$eq, $neSortable
waitlist_policy.capacity$eq, $ne, $lt, $lte, $gt, $gte, $in, $ninSortable
waitlist_policy.reservation_time_in_minutes$eq, $ne, $lt, $lte, $gt, $gte, $in, $ninSortable
participants_policy.enabled$eq, $neSortable
participants_policy.max_participants_per_booking$eq, $ne, $lt, $lte, $gt, $gte, $in, $ninSortable
resources_policy.enabled$eq, $neSortable
resources_policy.auto_assign_allowed$eq, $neSortable

Sorting

By default Query Booking Policies is sorted by createdDate in ascending order.

You can override the default sorting by specifying the sort object in the following format:

Copy
{ "sort": [ { "fieldName": "sortOrder", "order": "ASC" }, { "fieldName": "createdDate", "order": "DESC" } ] }

Related content:

Did this help?

Booking Policy Object


A booking policy is a set of rules that determine how customers can book a service, including timeframes for booking, canceling, or rescheduling.

Properties
idstringRead-onlyformat GUID

ID of the booking policy.


revisionintegerRead-onlyformat int64

Revision number, which increments by 1 each time the booking policy is updated. To prevent conflicting changes, the current revision must be passed when updating the booking policy.


createdDatestringRead-onlyformat date-time

Date and time the booking policy was created in YYYY-MM-DDThh:mm:ss.sssZ format.


updatedDatestringRead-onlyformat date-time

Date and time the booking policy was updated in YYYY-MM-DDThh:mm:ss.sssZ format.


namestringmaxLength 400

Name of the booking policy.


customPolicyDescriptionCustomPolicyDescription

Custom description for the booking policy and whether it's displayed to the participant.


defaultbooleanRead-only

Whether the booking policy is the default.


limitEarlyBookingPolicyLimitEarlyBookingPolicy

Rule for limiting early bookings.


limitLateBookingPolicyLimitLateBookingPolicy

Rule for limiting late bookings. This rule and bookAfterStartPolicy can't be both enabled at the same time.


bookAfterStartPolicyBookAfterStartPolicy

Rule for booking after the start of a session or course. This rule and limitLateBookingPolicy can't be both enabled at the same time.


cancellationPolicyCancellationPolicy

Rule for canceling a booking.


reschedulePolicyReschedulePolicy

Rule for rescheduling a booking.


waitlistPolicyWaitlistPolicy

Waitlist rule for the service.


participantsPolicyParticipantsPolicy

Rule for participants per booking.


cancellationFeePolicyCancellationFeePolicy

Rules for cancellation fees.


saveCreditCardPolicySaveCreditCardPolicy

Rule for saving credit card details.


extendedFieldsExtendedFields

Extensions enabling users to save custom data related to the booking policies.

JSON
{ "id": "caa894dc-e84e-4498-aef3-76610c5cd95c", "revision": "6", "createdDate": "2023-01-13T15:00:41.492Z", "updatedDate": "2023-02-16T11:33:39.421Z", "name": "Default policy", "customPolicyDescription": { "enabled": false, "description": "" }, "default": true, "limitEarlyBookingPolicy": { "enabled": false, "earliestBookingInMinutes": 10080 }, "limitLateBookingPolicy": { "enabled": false, "latestBookingInMinutes": 1440 }, "bookAfterStartPolicy": { "enabled": false }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": false, "latestCancellationInMinutes": 1440 }, "reschedulePolicy": { "enabled": true, "limitLatestReschedule": false, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": false, "capacity": 10, "reservationTimeInMinutes": 10 }, "participantsPolicy": { "enabled": false, "maxParticipantsPerBooking": 1 } }
Did this help?

POST

Create Booking Policy


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.
Endpoint
POST
https://www.wixapis.com/bookings/v1/booking-policies

Body Params
bookingPolicyBookingPolicyRequired

Booking policy to create.

Response Object
bookingPolicyBookingPolicy

Created booking policy.

Request
cURL
curl -X POST \ 'https://wixapis.com/bookings/v1/booking-policies' \ -H 'Authorization: <AUTH>' \ -d '{ "bookingPolicy": { "name": "My custom policy", "customPolicyDescription": { "enabled": true, "description": "To cancel or reschedule, please contact us at least 24 hours in advance" }, "limitEarlyBookingPolicy": { "enabled": true, "earliestBookingInMinutes": 43200 }, "limitLateBookingPolicy": { "enabled": true, "latestBookingInMinutes": 180 }, "bookAfterStartPolicy": { "enabled": false }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": true, "latestCancellationInMinutes": 1440 }, "reschedulePolicy": { "enabled": true, "limitLatestReschedule": true, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": true, "capacity": 10, "reservationTimeInMinutes": 30 }, "participantsPolicy": { "enabled": false, "maxParticipantsPerBooking": 1 } } }'
Response
JSON
{ "bookingPolicy": { "id": "1a426c47-0c86-46c7-8573-c7bce734f660", "revision": "1", "createdDate": "2023-02-16T10:46:17.420Z", "updatedDate": "2023-02-16T10:46:17.420Z", "name": "My custom policy", "customPolicyDescription": { "enabled": true, "description": "To cancel or reschedule, please contact us at least 24 hours in advance" }, "default": false, "limitEarlyBookingPolicy": { "enabled": true, "earliestBookingInMinutes": 43200 }, "limitLateBookingPolicy": { "enabled": true, "latestBookingInMinutes": 180 }, "bookAfterStartPolicy": { "enabled": false }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": true, "latestCancellationInMinutes": 1440 }, "reschedulePolicy": { "enabled": true, "limitLatestReschedule": true, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": true, "capacity": 10, "reservationTimeInMinutes": 30 }, "participantsPolicy": { "enabled": false, "maxParticipantsPerBooking": 1 } } }
Did this help?

GET

Get Booking Policy


Retrieves a booking policy.

Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/bookings/v1/booking-policies/{bookingPolicyId}

Path Params
bookingPolicyIdstringRequired

ID of the booking policy to retrieve.

Response Object
bookingPolicyBookingPolicy

Retrieved booking policy.

Retrieve a `bookingPolicy` object.
Request
cURL
curl -X GET \ 'https://wixapis.com/bookings/v1/booking-policies/1a426c47-0c86-46c7-8573-c7bce734f660' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "bookingPolicy": { "id": "1a426c47-0c86-46c7-8573-c7bce734f660", "revision": "1", "createdDate": "2023-02-16T10:46:17.420Z", "updatedDate": "2023-02-16T10:46:17.420Z", "name": "My custom policy", "customPolicyDescription": { "enabled": true, "description": "To cancel or reschedule, please contact us at least 24 hours in advance" }, "default": false, "limitEarlyBookingPolicy": { "enabled": true, "earliestBookingInMinutes": 43200 }, "limitLateBookingPolicy": { "enabled": true, "latestBookingInMinutes": 180 }, "bookAfterStartPolicy": { "enabled": false }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": true, "latestCancellationInMinutes": 1440 }, "reschedulePolicy": { "enabled": true, "limitLatestReschedule": true, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": true, "capacity": 10, "reservationTimeInMinutes": 30 }, "participantsPolicy": { "enabled": false, "maxParticipantsPerBooking": 1 } } }
Did this help?

DELETE

Delete Booking Policy


Deletes a booking policy.

You can't delete the default policy without setting a different policy as default first.

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
DELETE
https://www.wixapis.com/bookings/v1/booking-policies/{bookingPolicyId}

Path Params
bookingPolicyIdstringRequired

ID of the booking policy to delete.

Response Object
Returns an empty object.
Delete a `bookingPolicy` object.
Request
cURL
curl -X DELETE \ 'https://wixapis.com/bookings/v1/booking-policies/6806bf45-1d65-4983-a607-6cd277ec732a' \ -H 'Authorization: <AUTH>' \ -d '{ "revision": "2" }'
Response
JSON
{}
Errors
428Failed Precondition

There is 1 error with this status code:

See the entire list and learn more about Wix errors.

Did this help?

POST

Get Strictest Booking Policy


Retrieves the strictest version of each policy rule from a list of booking policies.

Returns a hypothetical bookingPolicy object that combines the strictest version of each rule. The id of the returned policy is null and no corresponding bookingPolicy object is created. To create a new policy, you can use Create Booking Policy.

Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/bookings/v1/booking-policies/strictest

Body Params
bookingPolicyIdsArray <string>Requiredformat GUIDmaxItems 100

IDs of the booking policies for which to retrieve the strictest rules for.

Response Object
bookingPolicyBookingPolicy

Hypothetical bookingPolicy object that combines the strictest version of each rule. bookingPolicy.id is null and the returned object isn't actually created. To create a new policy, you can use Create Booking Policy.

Retrieves a hypothetical `bookingPolicy` object that combines the strictest version of each rule.
Request
cURL
curl -X GET \ 'https://wixapis.com/bookings/v1/booking-policies/strictest' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "bookingPolicy": { "id": null, "revision": "1", "createdDate": "2023-02-16T10:46:17.420Z", "updatedDate": "2023-02-16T10:46:17.420Z", "name": "My custom policy", "customPolicyDescription": { "enabled": true, "description": "To cancel or reschedule, please contact us at least 24 hours in advance" }, "default": false, "limitEarlyBookingPolicy": { "enabled": true, "earliestBookingInMinutes": 43200 }, "limitLateBookingPolicy": { "enabled": true, "latestBookingInMinutes": 180 }, "bookAfterStartPolicy": { "enabled": false }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": true, "latestCancellationInMinutes": 1440 }, "reschedulePolicy": { "enabled": true, "limitLatestReschedule": true, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": true, "capacity": 10, "reservationTimeInMinutes": 30 }, "participantsPolicy": { "enabled": false, "maxParticipantsPerBooking": 1 } } }
Did this help?

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 } } }
Did this help?

POST

Set Default Booking Policy


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.

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
POST
https://www.wixapis.com/bookings/v1/booking-policies/{bookingPolicyId}:setDefault

Path Params
bookingPolicyIdstringRequired

ID of the booking policy that's set as default.

Response Object
currentDefaultBookingPolicyCurrentDefaultBookingPolicy

New default booking policy.


previousDefaultBookingPolicyPreviousDefaultBookingPolicy

Previous default booking policy. Not available if the provided booking policy was already the default.

Update a `bookingPolicy` to become the default policy, while updating the previous default BookingPolicy to be no longer the default
Request
cURL
curl -X POST \ 'https://wixapis.com/bookings/v1/booking-policies/1a426c47-0c86-46c7-8573-c7bce734f660:setDefault' \ -H 'Authorization: <AUTH>' \
Response
JSON
{ "currentDefaultBookingPolicy": { "id": "1a426c47-0c86-46c7-8573-c7bce734f660", "revision": "3", "createdDate": "2023-02-16T10:46:17.420Z", "updatedDate": "2023-02-17T15:38:10.288Z", "name": "Appointment Policy", "customPolicyDescription": { "enabled": true, "description": "To cancel, please contact us at least 48 hours in advance" }, "default": true, "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 } }, "previousDefaultBookingPolicy": { "id": "caa894dc-e84e-4498-aef3-76610c5cd95c", "revision": "7", "createdDate": "2023-01-13T15:00:41.492Z", "updatedDate": "2023-02-17T15:38:10.287Z", "name": "Default policy", "customPolicyDescription": { "enabled": false, "description": "" }, "default": false, "limitEarlyBookingPolicy": { "enabled": false, "earliestBookingInMinutes": 10080 }, "limitLateBookingPolicy": { "enabled": false, "latestBookingInMinutes": 1440 }, "bookAfterStartPolicy": { "enabled": false }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": false, "latestCancellationInMinutes": 1440 }, "reschedulePolicy": { "enabled": true, "limitLatestReschedule": false, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": false, "capacity": 10, "reservationTimeInMinutes": 10 }, "participantsPolicy": { "enabled": false, "maxParticipantsPerBooking": 1 } } }
Did this help?

POST

Query Booking Policies


Retrieves a list of booking policies, given the provided paging, filtering, and sorting.

Query Booking Policies runs with these defaults, which you can override:

  • Sorted by createdDate in ascending order.
  • cursorPaging.limit set to 100.

For details about all supported filters and sorting options, see the supported filters article.

To learn about working with Query endpoints, see API Query Language, Sorting and Paging, and Field Projection.

Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/bookings/v1/booking-policies/query

Body Params
queryQueryRequired

The query by which to select booking policies. See the supported filters article for details.

Response Object
bookingPoliciesArray <BookingPolicy>

Retrieved booking policies.


pagingMetadataPagingMetadata

Paging metadata.

Request
cURL
curl -X POST \ 'https://wixapis.com/bookings/v1/booking-policies/query' \ -H 'Authorization: <AUTH>' \ -d '{ "query": { "sort": [], "filter": { "default": true } } }'
Response
JSON
{ "bookingPolicies": [ { "id": "caa894dc-e84e-4498-aef3-76610c5cd95c", "revision": "6", "createdDate": "2023-01-13T15:00:41.492Z", "updatedDate": "2023-02-16T11:33:39.421Z", "name": "Default policy", "customPolicyDescription": { "enabled": false, "description": "" }, "default": true, "limitEarlyBookingPolicy": { "enabled": false, "earliestBookingInMinutes": 10080 }, "limitLateBookingPolicy": { "enabled": false, "latestBookingInMinutes": 1440 }, "bookAfterStartPolicy": { "enabled": false }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": false, "latestCancellationInMinutes": 1440 }, "reschedulePolicy": { "enabled": true, "limitLatestReschedule": false, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": false, "capacity": 10, "reservationTimeInMinutes": 10 }, "participantsPolicy": { "enabled": false, "maxParticipantsPerBooking": 1 } } ], "pagingMetadata": { "count": 1, "cursors": {}, "hasNext": false } }
Did this help?

POST

Count Booking Policies


Counts booking policies, given the provided filtering.

See the supported filters article for details.

Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/bookings/v1/booking-policies/count

Body Params
filterstruct

Filter to base the count on. See the supported filters article for details.

Response Object
countinteger

Number of booking policies matching the provided filter.

Request
cURL
curl -X POST \ 'https://wixapis.com/bookings/v1/booking-policies/count' \ -H 'Authorization: <AUTH>' \ -d '{}'
Response
JSON
{ "count": 8 }
Did this help?

Booking Policy Created


Triggered when a booking policy is created.

Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
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
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.bookings.v1.booking_policy.


slugstring

Event name. Expected created.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


createdEventCreatedEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.bookings.v1.booking_policy_created", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }

BookingPolicyCreated
JSON
{ "id": "c1170ba2-af62-4ebc-89f6-5fa044c8d7d2", "entityFqdn": "wix.bookings.v1.booking_policy", "slug": "created", "entityId": "6806bf45-1d65-4983-a607-6cd277ec732a", "createdEvent": { "entityAsJson": "{\"id\":\"6806bf45-1d65-4983-a607-6cd277ec732a\",\"revision\":\"1\",\"createdDate\":\"2023-02-16T10:48:59.975Z\",\"updatedDate\":\"2023-02-16T10:48:59.975Z\",\"name\":\"My custom policy 2\",\"customPolicyDescription\":{\"enabled\":false,\"description\":\"\"},\"default\":false,\"limitEarlyBookingPolicy\":{\"enabled\":true,\"earliestBookingInMinutes\":43200},\"limitLateBookingPolicy\":{\"enabled\":true,\"latestBookingInMinutes\":180},\"bookAfterStartPolicy\":{\"enabled\":false},\"cancellationPolicy\":{\"enabled\":false,\"limitLatestCancellation\":false,\"latestCancellationInMinutes\":1440},\"reschedulePolicy\":{\"enabled\":false,\"limitLatestReschedule\":false,\"latestRescheduleInMinutes\":1440},\"waitlistPolicy\":{\"enabled\":false,\"capacity\":10,\"reservationTimeInMinutes\":10},\"participantsPolicy\":{\"enabled\":false,\"maxParticipantsPerBooking\":1}}" }, "eventTime": "2023-02-16T10:49:00.088624Z", "triggeredByAnonymizeRequest": false, "entityEventSequence": "1" }
Did this help?

Booking Policy Updated


Triggered when a booking policy is updated, including when a policy's default attribute changes.

Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
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
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.bookings.v1.booking_policy.


slugstring

Event name. Expected updated.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


updatedEventUpdatedEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.bookings.v1.booking_policy_updated", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }

BookingPolicyUpdated
JSON
{ "id": "39c351d8-b571-4bf6-8313-0722c34eabb3", "entityFqdn": "wix.bookings.v1.booking_policy", "slug": "updated", "entityId": "caa894dc-e84e-4498-aef3-76610c5cd95c", "updatedEvent": { "currentEntityAsJson": "{\"id\":\"caa894dc-e84e-4498-aef3-76610c5cd95c\",\"revision\":\"6\",\"createdDate\":\"2023-01-13T15:00:41.492Z\",\"updatedDate\":\"2023-02-16T11:33:39.421Z\",\"name\":\"Default policy\",\"customPolicyDescription\":{\"enabled\":false,\"description\":\"\"},\"default\":true,\"limitEarlyBookingPolicy\":{\"enabled\":false,\"earliestBookingInMinutes\":10080},\"limitLateBookingPolicy\":{\"enabled\":false,\"latestBookingInMinutes\":1440},\"bookAfterStartPolicy\":{\"enabled\":false},\"cancellationPolicy\":{\"enabled\":true,\"limitLatestCancellation\":false,\"latestCancellationInMinutes\":1440},\"reschedulePolicy\":{\"enabled\":true,\"limitLatestReschedule\":false,\"latestRescheduleInMinutes\":1440},\"waitlistPolicy\":{\"enabled\":false,\"capacity\":10,\"reservationTimeInMinutes\":10},\"participantsPolicy\":{\"enabled\":false,\"maxParticipantsPerBooking\":1}}" }, "eventTime": "2023-02-16T11:33:39.571403Z", "triggeredByAnonymizeRequest": false, "entityEventSequence": "6" }
Did this help?

Booking Policy Deleted


Triggered when a booking policy is deleted.

Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
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
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.bookings.v1.booking_policy.


slugstring

Event name. Expected deleted.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


deletedEventstruct

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.bookings.v1.booking_policy_deleted", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }

BookingPolicyDeleted
JSON
{ "id": "8586601e-f026-4a36-8a96-096a9b921762", "entityFqdn": "wix.bookings.v1.booking_policy", "slug": "deleted", "entityId": "9df554d4-d722-4326-88bc-12520133e4b0", "deletedEvent": { "movedToTrash": true }, "eventTime": "2023-02-16T12:21:00.824983Z", "triggeredByAnonymizeRequest": false }
Did this help?

Default Booking Policy Set


Triggered when the site's default policy changes. Then, Booking Policy Updated is also triggered both for the new and the previous default policy.

Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Learn more about app permissions.
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
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.bookings.v1.booking_policy.


slugstring

Event name. Expected default_booking_policy_set.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


actionEventActionEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "wix.bookings.v1.booking_policy_default_booking_policy_set", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }

DefaultBookingPolicySet
JSON
{ "id": "c5d438c2-99e8-47c8-bfe8-5b33746a2c6a", "entityFqdn": "wix.bookings.v1.booking_policy", "slug": "default_booking_policy_set", "entityId": "caa894dc-e84e-4498-aef3-76610c5cd95c", "actionEvent": { "bodyAsJson": "{\"currentDefaultBookingPolicy\":{\"id\":\"caa894dc-e84e-4498-aef3-76610c5cd95c\",\"revision\":\"8\",\"createdDate\":\"2023-01-13T15:00:41.492Z\",\"updatedDate\":\"2023-02-17T15:30:35.813Z\",\"name\":\"Default policy\",\"customPolicyDescription\":{\"enabled\":false,\"description\":\"\"},\"default\":true,\"limitEarlyBookingPolicy\":{\"enabled\":false,\"earliestBookingInMinutes\":10080},\"limitLateBookingPolicy\":{\"enabled\":false,\"latestBookingInMinutes\":1440},\"bookAfterStartPolicy\":{\"enabled\":false},\"cancellationPolicy\":{\"enabled\":true,\"limitLatestCancellation\":false,\"latestCancellationInMinutes\":1440},\"reschedulePolicy\":{\"enabled\":true,\"limitLatestReschedule\":false,\"latestRescheduleInMinutes\":1440},\"waitlistPolicy\":{\"enabled\":false,\"capacity\":10,\"reservationTimeInMinutes\":10},\"participantsPolicy\":{\"enabled\":false,\"maxParticipantsPerBooking\":1}},\"previousDefaultBookingPolicy\":{\"id\":\"1a426c47-0c86-46c7-8573-c7bce734f660\",\"revision\":\"4\",\"createdDate\":\"2023-02-16T10:46:17.420Z\",\"updatedDate\":\"2023-02-17T15:30:35.808Z\",\"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}}}" }, "eventTime": "2023-02-17T15:30:36.156858Z", "triggeredByAnonymizeRequest": false }
Did this help?