About the Service Options and Variants API

The Service Options and Variants API lets you manage custom options for services.

You can configure options based on:

  • The staff member providing the service.
  • Appointment duration.
  • A custom parameter, such as customer age or equipment type.

Each option includes a list of choices that customers can select when booking a service. A service variant is a unique combination of all choices made by the customer during booking. Only a single option is permitted per service, meaning a variant corresponds directly to 1 choice from that option.

Before You Begin

Note the following before coding:

  • Only 1 serviceOptionsAndVariants object is allowed per service.
  • Only 1 option is supported per serviceOptionsAndVariants object.
  • Variants aren't automatically calculated from the specified option and choices in the Create Service Options and Variants call. Instead, you must manually define all variants when calling Create Service Options and Variants.
  • After configuring a staff member-based option for a service, Wix Bookings automatically adds a new choice and variant when a new staff member is added to the service. Each new variant uses the service’s payment.varied.defaultPrice. Staff member-based choices and variants are automatically deleted if a staff member is removed from the service or the entire business.

Use Cases

Terminology

  • Option: A modification of a service based on staff member, event duration, or custom parameters (like customer age). Each option includes a list of supported choices that customers select when booking. Services can have only 1 option.
  • Choice: A specific value for a service option. For example, the option ageGroup may include choices like child, student, adult, and senior, each potentially priced differently.
  • Variant: A unique combination of all choices made by the customer when booking. For example, {"time": "afternoon", "ageGroup": "adult", "equipment": "kettlebells"}. Note that since a service can currently only have 1 option, variants are limited to that option and its choices.

For a comprehensive glossary of Wix Bookings terms, see Terminology.

See also

Did this help?