A booking policy snapshot is a saved version of a service's booking policy at the time a booking is created. This is important because a policy may change after a customer books the service, and having a snapshot preserves the original terms.
The Booking Policy Snapshots API allows you to retrieve policy snapshots.
For managing cancellation fees, you may also want to explore the Booking Fees API.
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 give business owners an overview of all bookings made under an older version of a service policy.
To display a list of bookings with outdated booking policy:
bookedEntity.item.slot.serviceId
in
the filter. For classes or courses include bookedEntity.item.schedule.serviceId
in the filter. You may use a conditional or
for both filter options in a
single call.The bookingPolicySnapshot
object is the version of a service's booking policy
at the time a booking is created. This allows you for example to charge
customers the correct cancellation fee even after a service's cancellation
policy has been updated.
Booking policy snapshot ID.
ID of the booking that's associated with this policy snapshot.
Snapshot of the booking policy. at the time the corresponding booking was created.
Date and time the booking policy snapshot was created in YYYY-MM-DDThh:mm:ssZ
format.
{
"booking_policy_snapshots": [
{
"id": "c82a3f42-7605-4e24-91f5-7517ae189b7d",
"booking_id": "353aa3b7-00ef-42bd-86ff-720d7ef60443",
"policy": {
"id": "7f31c2b3-9e6e-4b5f-b589-d524f1b3c872",
"revision": 5,
"created_date": "2024-01-10T10:30:00Z",
"updated_date": "2024-05-20T15:45:00Z",
"name": "Standard Booking Policy",
"custom_policy_description": {
"enabled": true,
"description": "This is the standard booking policy description."
},
"default": true,
"cancellation_policy": {
"enabled": true,
"limit_latest_cancellation": false,
"latest_cancellation_in_minutes": 1440
},
"reschedule_policy": {
"enabled": true,
"limit_latest_reschedule": false,
"latest_reschedule_in_minutes": 1440
},
"cancellation_fee_policy": {
"enabled": true,
"cancellation_windows": [
{
"amount": {
"value": "10",
"currency": "USD",
"formatted_value": null
},
"start_in_minutes": 1440
}
]
},
"save_credit_card_policy": {
"enabled": true
}
},
"created_date": "2024-06-15T10:45:00Z"
}
]
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of booking policy snapshots by booking IDs.
List of booking IDs to retrieve policy snapshots for.
Retrieved booking Policy snapshots.
curl -X GET \
'https://www.wixapis.com/_api/booking-policy-snapshots/v1/policy-snapshots?bookingIds=353aa3b7-00ef-42bd-86ff-720d7ef60443' \
-H 'Authorization: <AUTH>'
{
"booking_policy_snapshots": [
{
"id": "c82a3f42-7605-4e24-91f5-7517ae189b7d",
"booking_id": "353aa3b7-00ef-42bd-86ff-720d7ef60443",
"policy": {
"id": "7f31c2b3-9e6e-4b5f-b589-d524f1b3c872",
"revision": 5,
"created_date": "2024-01-10T10:30:00Z",
"updated_date": "2024-05-20T15:45:00Z",
"name": "Standard Booking Policy",
"custom_policy_description": {
"enabled": true,
"description": "This is the standard booking policy description."
},
"default": true,
"cancellation_policy": {
"enabled": true,
"limit_latest_cancellation": false,
"latest_cancellation_in_minutes": 1440
},
"reschedule_policy": {
"enabled": true,
"limit_latest_reschedule": false,
"latest_reschedule_in_minutes": 1440
},
"cancellation_fee_policy": {
"enabled": true,
"cancellation_windows": [
{
"amount": {
"value": "10",
"currency": "USD",
"formatted_value": null
},
"start_in_minutes": 1440
}
]
},
"save_credit_card_policy": {
"enabled": true
}
},
"created_date": "2024-06-15T10:45:00Z"
}
]
}
There is 1 error with this status code:
See the entire list and learn more about Wix errors.