POST

Bulk Update Section


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 Section API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the Wix App Market.

Updates multiple sections at once.

Each time a section is updated, its revision increments by 1. The existing revision must be included when updating a section. This ensures you're working with the latest section 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
POST
https://www.wixapis.com/restaurants/menus-section/v1/bulk/sections/update

Body Params
sectionsArray <MaskedSection>RequiredminItems 1maxItems 100

Sections to update.


returnEntityboolean

Whether to receive the updated sections in the response.

Response Object
resultsArray <BulkSectionResult>minItems 1maxItems 100

Information about the updated sections.


bulkActionMetadataBulkActionMetadata

Metadata for the API call.

Update multiple sections
Request
cURL
curl -X POST 'https://www.wixapis.com/restaurants/menus-section/v1/bulk/sections/update' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "sections": [ { "section": { "itemIds": [ "f6222bdc-1ab2-4cd4-bf6c-8d4fca055d86" ], "additionalImages": [], "id": "70f12b79-cd30-4750-91ab-1021a16cbbfa", "revision": "3", "name": "Drinks" }, "mask": { "paths": [ "itemIds" ] } }, { "section": { "itemIds": [], "additionalImages": [], "id": "9ea7135d-c232-437f-a9c3-33dd87265542", "name": "Desserts", "description": "Our desserts are made in house by our pastry chef", "revision": "2" }, "mask": { "paths": [ "name", "description" ] } } ], "returnEntity": true }'
Response
JSON
{ "results": [ { "sectionMetadata": { "id": "70f12b79-cd30-4750-91ab-1021a16cbbfa", "originalIndex": 0, "success": true }, "section": { "id": "70f12b79-cd30-4750-91ab-1021a16cbbfa", "revision": "4", "createdDate": "2023-12-17T20:39:33.155Z", "updatedDate": "2024-01-15T08:20:09.358Z", "name": "Drinks", "description": "", "additionalImages": [], "itemIds": ["f6222bdc-1ab2-4cd4-bf6c-8d4fca055d86"] } }, { "sectionMetadata": { "id": "9ea7135d-c232-437f-a9c3-33dd87265542", "originalIndex": 1, "success": true }, "section": { "id": "9ea7135d-c232-437f-a9c3-33dd87265542", "revision": "3", "createdDate": "2023-12-17T20:39:33.155Z", "updatedDate": "2024-01-15T08:20:09.358Z", "name": "Desserts", "description": "Our desserts are made in house by our pastry chef", "additionalImages": [], "itemIds": [ "b3dfd67a-7c77-43e8-a707-38eb53850d4a", "b8e179cc-f339-4ccb-afa9-d9e04d56c461", "ec225729-29ae-4a73-bdf6-f873bcabcd53", "02042f01-58ab-441c-b5db-55f51c855a62", "0517e5d4-8fd3-4b28-a743-68cf631e534a", "cbbf4358-292c-4e9e-a820-7e73b4c4ac00" ] } } ], "bulkActionMetadata": { "totalSuccesses": 2, "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?