Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Cancel Booking

Developer Preview

Cancel an existing booking.
When invoked by a customer flow, this action is validated against the service's bookings policy.
Cancelling a bookings triggers the following:

  • The corresponding participant is removed from the session.
  • If the booking was created from a slot (and not session id or schedule id), the corresponding session is deleted from the calendar.
  • The booking status changes CANCELED.

Permissions
This endpoint requires the Manage Bookings permission scope.

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

POST

https://www.wixapis.com/bookings/v1/bookings/{id}/cancel

Path Params

NAME
TYPE
DESCRIPTION
id
Required

string

Id of the Booking to be cancelled

Body Params

NAME
TYPE
DESCRIPTION
notifyParticipants
Deprecated

boolean

Indication whether to notify the participants in this Booking that it's cancelled (e.g. in email) deprecated, use participant_notification

participantNotification

object

Whether to notify participants about the change and an optional custom message

authorizationToken

string

An optional token that will be used to authorize the request

If null, authorization will be determined based on the request context

Token can be retrieved by calling GenerateAuthorizationToken

Response Object

NAME
TYPE
DESCRIPTION
id

string

Id of the Booking to be cancelled

errors

Array<object>

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Cancel Booking

Cancels a bookings

Request

curl

Copy Code
1curl -X POST \
2 'http://www.wixapis.com/bookings/v1/bookings/e0e5f390-6302-46fc-a5ee-a2ec5000d4e8/cancel' \
3 -H 'Authorization: <AUTH>'
4 --data '{
5 "id" : "e0e5f390-6302-46fc-a5ee-a2ec5000d4e8"
6 }'

Response

json

1
2{"id": "e0e5f390-6302-46fc-a5ee-a2ec5000d4e8"}