Booking policies are a set of rules that define how customers can book a service, including:
With the Wix Bookings Policies API, you can:
See Setting Up Your Booking Policies for more details.
It’s important to note the following points before starting to code:
For a comprehensive glossary of Wix Bookings terms, see Terminology.
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.
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:
id
and revision
of the service for which the owner
wants to change the booking policy.bookingPolicy.id
.service.id
, service.revision
, and service.booking.policy.id
.Your app could allow the user to set a new default booking policy for their site.
To change the default policy:
bookingPolicy.id
.Query Booking Policies
and Count Booking Policies
allow you to filter based on properties of the bookingPolicy
object.
Specify the filter
object in the following format:
{
"filter": {
"fieldName": {
"$eq": "value"
}
}
}
The following table shows field support for filters and sorting
for the bookingPolicy
object:
Field | Supported Filters | Sortable |
---|---|---|
id | $eq , $ne , $in | Sortable |
name | $eq , $ne , $startsWith | Sortable |
custom_policy_description.enabled | $eq , $ne | Sortable |
custom_policy_description.description | $eq , $ne , $startsWith | Sortable |
limit_early_booking_policy.enabled | $eq , $ne | Sortable |
limit_early_booking_policy.earliest_booking_in_minutes | $eq , $ne , $lt , $lte , $gt , $gte , $in , $nin | Sortable |
limit_late_booking_policy.enabled | $eq , $ne | Sortable |
limit_late_booking_policy.latest_booking_in_minutes | $eq , $ne , $lt , $lte , $gt , $gte , $in , $nin | Sortable |
book_after_start_policy.enabled | $eq , $ne | Sortable |
cancellation_policy.enabled | $eq , $ne | Sortable |
cancellation_policy.limit_latest_cancellation | $eq , $ne | Sortable |
cancellation_policy.latest_cancellation_in_minutes | $eq , $ne , $lt , $lte , $gt , $gte , $in , $nin | Sortable |
reschedule_policy.enabled | $eq , $ne | Sortable |
reschedule_policy.limit_latest_reschedule | $eq , $ne | Sortable |
reschedule_policy.latest_reschedule_in_minutes | $eq , $ne , $lt , $lte , $gt , $gte , $in , $nin | Sortable |
waitlist_policy.enabled | $eq , $ne | Sortable |
waitlist_policy.capacity | $eq , $ne , $lt , $lte , $gt , $gte , $in , $nin | Sortable |
waitlist_policy.reservation_time_in_minutes | $eq , $ne , $lt , $lte , $gt , $gte , $in , $nin | Sortable |
participants_policy.enabled | $eq , $ne | Sortable |
participants_policy.max_participants_per_booking | $eq , $ne , $lt , $lte , $gt , $gte , $in , $nin | Sortable |
resources_policy.enabled | $eq , $ne | Sortable |
resources_policy.auto_assign_allowed | $eq , $ne | Sortable |
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:
{
"sort": [
{
"fieldName": "sortOrder",
"order": "ASC"
},
{
"fieldName": "createdDate",
"order": "DESC"
}
]
}
Related content:
A booking policy is a set of rules that determine how customers can book a service, including timeframes for booking, canceling, or rescheduling.
ID of the booking policy.
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.
Date and time the booking policy was created in YYYY-MM-DDThh:mm:ss.sssZ
format.
Date and time the booking policy was updated in YYYY-MM-DDThh:mm:ss.sssZ
format.
Name of the booking policy.
Custom description for the booking policy and whether it's displayed to the participant.
Whether the booking policy is the default.
Rule for limiting early bookings.
Rule for limiting late bookings. This rule and bookAfterStartPolicy
can't
be both enabled at the same time.
Rule for booking after the start of a session or course. This rule and
limitLateBookingPolicy
can't be both enabled at the same time.
Rule for canceling a booking.
Rule for rescheduling a booking.
Waitlist rule for the service.
Rule for participants per booking.
Rules for cancellation fees.
Rule for saving credit card details.
Extensions enabling users to save custom data related to the booking policies.
{
"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
}
}
Creates a booking policy.
You can only call this method when authenticated as a Wix app or Wix user identity.
Booking policy to create.
Created booking policy.
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
}
}
}'
{
"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
}
}
}
Retrieves a booking policy.
ID of the booking policy to retrieve.
Retrieved booking policy.
curl -X GET \
'https://wixapis.com/bookings/v1/booking-policies/1a426c47-0c86-46c7-8573-c7bce734f660' \
-H 'Authorization: <AUTH>'
{
"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
}
}
}
Deletes a booking policy.
You can't delete the default policy without setting a different policy as default first.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the booking policy to delete.
curl -X DELETE \
'https://wixapis.com/bookings/v1/booking-policies/6806bf45-1d65-4983-a607-6cd277ec732a' \
-H 'Authorization: <AUTH>' \
-d '{
"revision": "2"
}'
{}
There is 1 error with this status code:
See the entire list and learn more about Wix errors.
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.
IDs of the booking policies for which to retrieve the strictest rules for.
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.
curl -X GET \
'https://wixapis.com/bookings/v1/booking-policies/strictest' \
-H 'Authorization: <AUTH>'
{
"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
}
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the booking policy.
Booking policy to update.
Updated booking policy.
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"
]
}
}'
{
"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
}
}
}
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.
ID of the booking policy that's set as default.
New default booking policy.
Previous default booking policy. Not available if the provided booking policy was already the default.
curl -X POST \
'https://wixapis.com/bookings/v1/booking-policies/1a426c47-0c86-46c7-8573-c7bce734f660:setDefault' \
-H 'Authorization: <AUTH>' \
{
"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
}
}
}
Retrieves a list of booking policies, given the provided paging, filtering, and sorting.
Query Booking Policies runs with these defaults, which you can override:
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.
The query by which to select booking policies. See the supported filters article for details.
Retrieved booking policies.
Paging metadata.
curl -X POST \
'https://wixapis.com/bookings/v1/booking-policies/query' \
-H 'Authorization: <AUTH>' \
-d '{
"query": {
"sort": [],
"filter": {
"default": true
}
}
}'
{
"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
}
}
Counts booking policies, given the provided filtering.
See the supported filters article for details.
Filter to base the count on. See the supported filters article for details.
Number of booking policies matching the provided filter.
curl -X POST \
'https://wixapis.com/bookings/v1/booking-policies/count' \
-H 'Authorization: <AUTH>' \
-d '{}'
{
"count": 8
}
Triggered when a booking policy is created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.bookings.v1.booking_policy
.
Event name. Expected created
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"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
}
}
}
{
"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"
}
Triggered when a booking policy is updated, including when a policy's
default
attribute changes.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.bookings.v1.booking_policy
.
Event name. Expected updated
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"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
}
}
}
{
"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"
}
Triggered when a booking policy is deleted.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.bookings.v1.booking_policy
.
Event name. Expected deleted
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"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
}
}
}
{
"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
}
Triggered when the site's default policy changes. Then, Booking Policy Updated is also triggered both for the new and the previous default policy.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.bookings.v1.booking_policy
.
Event name. Expected default_booking_policy_set
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"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
}
}
}
{
"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
}