PATCH

Update Variant


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Note: The Item Variants API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the Wix App Market.

Updates an item variant.

To update multiple item variants at once, use Bulk Update Variants.

Each time an item variant is updated, its revision increments by 1. The existing revision must be included when updating the variant. This ensures you're working with the latest variant information, and it prevents unintended overwrites.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
PATCH
https://www.wixapis.com/restaurants/item-variants/v1/variants/{variant.id}

Path Params
variant.idstringRequired

Item variant ID.

Body Params
variantVariantRequired

Item variant to update.

Response Object
variantVariant

Updated item variant.

Update a variant
Request
cURL
curl -X PATCH https://www.wixapis.com/restaurants/item-variants/v1/variants/02042f01-58ab-441c-b5db-55f51c855a11?variantId=02042f01-58ab-441c-b5db-55f51c855a11 \ -H 'Authorization: <AUTH>' \ --data-binary '{ "variant": { "id": "02042f01-58ab-441c-b5db-55f51c855a11", "revision": "1", "name": "Medium" }, "mask": { "paths": [ "name" ] } }'
Response
JSON
{ "variant": { "id": "02042f01-58ab-441c-b5db-55f51c855a11", "revision": "2", "createdDate": "2023-12-04T08:12:01.896Z", "updatedDate": "2023-12-04T08:38:47.940Z", "name": "Medium" } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?