POST

Bulk Create 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.

Creates multiple item variants.

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
POST
https://www.wixapis.com/restaurants/item-variants/v1/bulk/variants/create

Body Params
variantsArray <Variant>RequiredmaxItems 100

Item variants details.


returnEntityboolean

Whether to receive the created item variants in the response.

Response Object
resultsArray <BulkVariantResult>

Information about the created item variants.


bulkActionMetadataBulkActionMetadata

Metadata for the API call.

Create multiple variants
Request
cURL
curl -X POST https://www.wixapis.com/restaurants/item-variants/v1/bulk/variants/create \ -H 'Authorization: <AUTH>' --data-binary '{ "variants": [ { "name": "Small" }, { "name": "Medium" }, { "name": "Large" } ], "returnEntity": false }'
Response
JSON
{ "results": [ { "itemMetadata": { "id": "02042f01-58ab-441c-33db-55221c855c11", "originalIndex": 0, "success": true } }, { "itemMetadata": { "id": "02022fe1-58ab-ee1c-33db-45521c855e11", "originalIndex": 1, "success": true } } ], "bulkActionMetadata": { "totalSuccesses": 3, "totalFailures": 0, "undetailedFailures": 0 } }
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?