POST

Bulk Create Variations


Developer Preview

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

Adds multiple variations to a draft catalog.

Authentication

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

Permissions
Manage Restaurant Catalogs
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/restaurants/v3/draft-catalogs/{catalogId}/bulk/variations/create

Path Params
catalogIdstringRequired

ID of the catalog the variations will belong to.

Body Params
variationsArray <NewVariation>minItems 1maxItems 20

Variations to create. Limited to 20 variations.


returnFullEntityboolean

Whether the full variation entity is returned. Defaults to true.

Response Object
resultsArray <BulkItemResult>

Information about the created variations.


bulkActionMetadataBulkActionMetadata

Bulk Create Variations metadata.

Bulk Create Variations
Request
cURL
curl -X POST \ 'https://www.wixapis.com/restaurants/v3/draft-catalogs/4d088f16-d341-44b2-ac69-ae8f3e8897fd/bulk/variations/create' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-raw '{ "returnFullEntity": true, "variations": [ { "name": "Mixed sliced mushrooms and garlic" } ] }'
Response
JSON
{ "results": [ { "entityMetadata": { "id": "1a4a1fd0-3029-46df-819b-e3d22dabb5aa", "originalIndex": 0, "success": true, "error": null }, "entity": { "id": "1a4a1fd0-3029-46df-819b-e3d22dabb5aa", "name": "Mixed sliced mushrooms and garlic", "description": null, "price": { "value": "0.00", "currency": "USD" }, "imageUrl": null, "labels": null, "inStock": true, "archived": false, "visibilityCriteria": { "visible": true, "fulfillmentTypes": ["DELIVERY", "PICKUP_OR_DINE_IN"], "platforms": [ "SITE", "MOBILE_SITE", "WIX_APP", "CALL_CENTER", "CHAT_BOT" ], "availability": null }, "dishOptions": null, "taxRate": "0.00", "acceptSpecialRequest": true, "type": "VARIATION" } } ], "bulkActionMetadata": { "totalSuccesses": 1, "totalFailures": 0, "undetailedFailures": 0 } }
Errors

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

Did this help?