POST

Query Variants


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.

Retrieves a list of item variants given the provided paging, filtering, and sorting. Up to 100 item variants can be returned per request.

For a detailed list of supported operations, see the Supported Filters and Sorting article. To learn how to query item variants, see API Query Language

Permissions
Manage Bookings Services and Settings
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/restaurants/item-variants/v1/variants/query

Body Params
queryQuery

Query options.

Response Object
variantsArray <Variant>

Retrieved item variants.


pagingMetadataPagingMetadata

Metadata of the paginated results.

Query all variants by the name
Request
cURL
curl -X POST https://www.wixapis.com/restaurants/item-variants/v1/variants/query \ -H 'Authorization: <AUTH>' --data-binary '{ "query": { "sort": [], "filter": { "name": "Small" } } }'
Response
JSON
{ "variants": [ { "id": "02042f01-58ab-441c-b5db-55f51c855a10", "revision": "1", "createdDate": "2023-12-04T08:12:10.571Z", "updatedDate": "2023-12-04T08:12:10.571Z", "name": "Small" } ], "pagingMetadata": { "count": 1, "cursors": {}, "hasNext": false } }
Errors

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

Did this help?