About the Wix Bookings Service Options and Variants API
APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.
With the Wix Bookings Service Options and Variants API, you can manage custom options and variants for services. This allows site owners to offer different prices for the same service based on their customers' choices.
You can read more about using the:
- Wix Bookings Pricing API (REST) to preview and calculate the price.
- Wix Bookings Pricing Provider SPI (Velo) that allows site owners to implement custom pricing logic.
Terminology
For a comprehensive glossary of Wix Bookings terms, see Terminology.
Before you begin
It's important to note the following points before starting to code:
To use the Service Options And Variants API, import
{ serviceOptionsAndVariants }
from thewix-bookings.v2
module:
javascript | Copy Codeimport { serviceOptionsAndVariants } from 'wix-bookings.v2';Only a single
serviceOptionsAndVariants
object is supported per service.Currently, only a single option is supported per
serviceOptionsAndVariants
object.New variants are automatically created for services with staff member-based options whenever a new staff member is added to the service. The new variant gets the default price of the service.
Variants are automatically deleted for services with staff member based options whenever a staff member is removed from the service or the business.
Was this helpful?