cancelBooking( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Cancels a booking.

The booking status changes to CANCELED.

If the booking was for an appointment, the corresponding session is deleted from the business calendar.

If the booking was for a class or course, the participants are removed from the class session or the course. But the course or class session remains on the business calendar.

You can pass a participantNotification.message to notify the customer of the cancelation. You also need to pass participantNotification.notifyParticipants as true to actually send the message.

In case you want to cancel a booking on behalf of a customer, we recommend to pass flowControlSettings.ignoreCancellationPolicy as false. This ensures that the cancelation is validated against the service's cancelation policy.

Admin Method

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings
Manage Bookings - all permissions
Learn more about permission scopes.
Method Declaration
Copy
Method Parameters
bookingIdstringRequired

ID of the booking to cancel.


optionsCancelBookingOptions

An object representing the available options for canceling a booking.

Returns
Return Type:Promise<CancelBookingResponse>
Was this helpful?
Yes
No