Search...
getServiceOptionsAndVariantsByServiceId( )
Developer Preview
Retrieves a service's options and variants by service_id
.
Syntax
function getServiceOptionsAndVariantsByServiceId(serviceId: string): Promise<GetServiceOptionsAndVariantsByServiceIdResponse>
getServiceOptionsAndVariantsByServiceId Parameters
NAME
TYPE
DESCRIPTION
serviceId
string
ID of the service to retrieve options and variants for.
Returns
Return Type:
Promise<
GetServiceOptionsAndVariantsByServiceIdResponse
>NAME
TYPE
DESCRIPTION
serviceVariants
ServiceOptionsAndVariants
Retrieved serviceOptionsAndVariants
object.
Was this helpful?
getServiceOptionsAndVariantsByServiceId example
Copy Code
1import { serviceOptionsAndVariants } from 'wix-bookings.v2';23 async function getServiceOptionsAndVariantsByServiceId(serviceId) {4 try {5 const result = await serviceOptionsAndVariants.getServiceOptionsAndVariantsByServiceId(serviceId);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13