createServiceOptionsAndVariants( )

Developer Preview

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, variantsprovides pricing details for either all choices of the single option (for CUSTOM options) or all staff members providing the service (for STAFF_MEMBER options).

Admin Method

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Bookings
Manage Bookings - all permissions
Learn more about permission scopes.
Method Declaration
Method Parameters

Service options and variants to create.

Return Type:Promise<ServiceOptionsAndVariants>
Was this helpful?