markBookingAsPending( )


Developer Preview

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

Updates the booking status to PENDING.

Service requirement

By default, this method only works for services (SDK | REST) with service.onlineBooking.requireManualApproval set to true. If you attempt to mark a booking as pending for a service that doesn't require approval, the call fails unless you use the skipPendingApprovalServiceValidation admin overwrite.

Status requirements

  • Original status: Booking must have CREATED status.
  • Target status: Booking moves to PENDING.

Checkout restrictions

Only call this method if the customer paid via a custom checkout. For Wix eCommerce checkouts (SDK | REST), Wix Bookings automatically manages the bookings' statuses based on payment processing.

When using custom checkouts, you can also update the booking's paymentStatus by specifying a new payment status.

Business workflow

After marking a booking as PENDING, the business must manually approve or reject it. You can call these methods:

Resource availability and scheduling

Marking a booking as PENDING immediately affects resource availability:

  • Calendar impact: The booking appears on the business calendar.
  • Availability: The time slot becomes unavailable for other bookings, even while pending approval.
  • Resource assignment: Available resources (SDK | REST) are automatically assigned if none were explicitly selected during booking creation.

Double bookings

By default, the method doesn't check for availability conflicts. To detect and handle double bookings, use the checkAvailabilityValidation: true admin overwrite.

Notify customers

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

Admin overwrites

There are small but important differences when you specify special flowControlSettings:

  • {"checkAvailabilityValidation": true}: Checks for double booking conflicts before updating the status. When conflicts exist, the booking is still marked as PENDING and doubleBooked is set to true for the business to resolve manually.
  • {"skipPendingApprovalServiceValidation": true}: Allows marking any booking as pending, even if the service doesn't require manual approval.

When using special flowControlSettings, ensure you have sufficient permissions. If you encounter failed calls due to insufficient permissions, consider the following options:

  • App developers can use a higher permission, such as MANAGE BOOKINGS - ALL PERMISSIONS.
  • Site developers can utilize elevation.

Granting additional permissions and using elevation permits method calls that would typically fail due to authorization checks. Therefore, you should use them intentionally and securely.

Method Declaration
Copy
Method Parameters
bookingIdstringRequired

ID of the booking to mark as PENDING.


revisionstringRequired

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

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


optionsMarkBookingAsPendingOptions
Returns
Return Type:Promise<MarkBookingAsPendingResponse>
Errors
403Permission Denied

There is 1 error with this status code.

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.

Did this help?