> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: updateServiceOptionsAndVariants(_id: string, serviceOptionsAndVariants: UpdateServiceOptionsAndVariants, options: UpdateServiceOptionsAndVariantsOptions) # Method package: wixBookingsV2 # Method menu location: wixBookingsV2 --> serviceOptionsAndVariants --> updateServiceOptionsAndVariants # Method Link: https://dev.wix.com/docs/velo/apis/wix-bookings-v2/service-options-and-variants/update-service-options-and-variants.md # Method Description: Updates the specified fields of the `serviceOptionsAndVariants` object. Currently, only a single option is supported per `serviceOptionsAndVariants` object. If you want to update `variants`, you must pass the full list of supported variants. If you want to update `options`, you must pass the full list of supported options. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## updateServiceOptionsAndVariants example for dashboard page code ```javascript import { serviceOptionsAndVariants } from 'wix-bookings.v2'; async function updateServiceOptionsAndVariants(id, serviceOptionsAndVariants, options) { try { const result = await serviceOptionsAndVariants.updateServiceOptionsAndVariants(id, serviceOptionsAndVariants, options); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## updateServiceOptionsAndVariants example for exporting from backend code ```javascript import { serviceOptionsAndVariants } from 'wix-bookings.v2'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedUpdateServiceOptionsAndVariants = elevate(serviceOptionsAndVariants.updateServiceOptionsAndVariants); export const updateServiceOptionsAndVariants = webMethod( Permissions.Anyone, async (id, serviceOptionsAndVariants, options) => { try { const result = await elevatedUpdateServiceOptionsAndVariants(id, serviceOptionsAndVariants, options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---