POST

Decline Booking


Updates the booking status to DECLINED and updates the relevant session's participants.approvalStatus to DECLINED without checking whether the relevant slot or schedule is still available.

eCommerce checkout restriction

Call this method only when using a custom checkout page. Don't call it when using a Wix eCommerce checkout (SDK | REST). In such cases, Wix automatically updates the booking status based on the paymentStatus of the corresponding Wix eCommerce order (SDK | REST).

When to call Confirm Or Decline Booking instead

The method doesn't check whether a slot or schedule is still available. For these checks you can call Confirm or Decline Booking (SDK | REST).

Original status validation

You can only decline bookings with a status of PENDING, CREATED, or WAITING_LIST.

Payment status

Also updates the booking's paymentStatus, if you specify a new payment status.

Notify customers

You can specify a participantNotification.message for the customer. To send the message, you must also specify participantNotification.notifyParticipants as true.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings - all permissions
Manage Bookings
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/_api/bookings-service/v2/bookings/{bookingId}/decline

Path Params
bookingIdstringRequired

ID of the booking to decline.

Body Params
revisionintegerRequiredminimum 1format int64

Revision number, which increments by 1 each time the booking is updated.

To prevent conflicting changes, the current revision must be specified when declining the booking.


participantNotificationParticipantNotification

Information about whether to notify the customer and the message to send.


paymentStatusstring

Payment status to set for the booking.


doubleBookedboolean

Whether this booking has a conflict with at least 1 other confirmed booking.


flowControlSettingsFlowControlSettings

Whether to ignore specific standard procedures of the Wix Bookings flow. For example, whether to refund a declined booking.

Response Object
bookingBooking

Declined booking.

Decline a booking
Request
cURL
curl -X POST \ 'https://www.wixapis.com/bookings/v2/bookings/17411c29-cfcb-4c07-9437-b673764781dd/decline' \ -H 'Authorization: <AUTH>' \ -d '{ "participantNotification": { "notifyParticipants": false }, "bookingId": "17411c29-cfcb-4c07-9437-b673764781dd", "revision": "2" }'
Response
JSON
{ "booking": { "id": "17411c29-cfcb-4c07-9437-b673764781dd", "bookedEntity": { "slot": { "sessionId": "2mmoW0vwKcSFyxtOfCdMtcmghSMJwt9gvKEs3YufCQ4ftORLpGnAt4zWE19zlAOFp5lEGQFjGVvnKWucD1Ew7DAjNQejautc7UJZ", "eventId": "65a5776e-37f1-45f7-8e4c-f22d01b23254", "serviceId": "bf7107e7-3223-4d7d-949e-1ed167d3e574", "scheduleId": "d8c97daa-3de4-4fe2-ba74-801d8dfb1208", "startDate": "2022-10-31T11:00:00.000Z", "endDate": "2022-10-31T12:00:00.000Z", "timezone": "Europe/Dublin", "resource": { "id": "76570209-101f-409b-af97-b445bdb63125", "name": "Staff Member #1", "email": null, "scheduleId": "9b6ad565-f28f-41c7-bbb2-0ce74dcfc054" }, "location": { "id": "9de094d5-8985-484e-9218-d020d9d17953", "name": "Location Name", "locationType": "OWNER_BUSINESS" } }, "title": "Service Name", "tags": ["INDIVIDUAL"] }, "contactDetails": { "contactId": "00fdf65c-e772-4b27-9c5e-8b2b2c289ec7", "firstName": "Michel", "lastName": "Bejo", "email": "Michel@example.com" }, "additionalFields": [], "totalParticipants": 1, "status": "DECLINED", "paymentStatus": "UNDEFINED", "selectedPaymentOption": "OFFLINE", "createdDate": "2022-10-30T15:20:51.320Z", "externalUserId": null, "bookingSource": { "platform": "WEB", "actor": "CUSTOMER", "appDefId": null, "appName": null }, "revision": "3", "createdBy": { "contactId": "00fdf65c-e772-4b27-9c5e-8b2b2c289ec7", "memberId": "00fdf65c-e772-4b27-9c5e-8b2b2c289ec7", "identityType": "UNKNOWN" }, "startDate": "2022-10-31T11:00:00Z", "endDate": "2022-10-31T12:00:00Z", "updatedDate": "2022-10-30T15:22:04.164Z", "doubleBooked": false, "extendedFields": null, "totalParticipants": 1 } }
Errors
404Not Found

There is 1 error with this status code.

428Failed Precondition

There are 2 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?