This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates options and variants for a service.
Before creating the serviceOptionsAndVariants
object you need to anticipate and manually define
all variants based on the defined options and their choices. You then pass
the options
and variants
arrays in the
request. Variants aren't automatically calculated from the defined options and choices.
Current Limitations:
Only a single serviceOptionsAndVariants
object is supported per service.
Only a single option is supported per serviceOptionsAndVariants
object. This means that services are limited to a single option. Therefore, variants
provides pricing details for either all choices of the single option (for CUSTOM
options) or all staff members providing the service (for STAFF_MEMBER
options).
For a list of error messages, see Create Service Options and Variants Errors.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
Service options and variants to create.