POST

Bulk Update Services


Updates up to 100 services.

See Update Service (SDK | REST) for more details.

The call succeeds even if one or more individual services can't be updated. Information about failures is returned in bulkActionMetadata.

Authentication

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

Permissions
Manage Bookings - all permissions
Manage Bookings
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/bookings/v2/bulk/services/update

Body Params
servicesArray <MaskedService>maxItems 100

Services to update.


returnEntityboolean

Whether to include the updated services in the response. Default: false

Response Object
resultsArray <BulkServiceResult>

The result of each service update.


bulkActionMetadataBulkActionMetadata

Update statistics.

Update multiple services by enabling online booking for one service and hiding another service from the site
Request
cURL
curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/update' \ -H 'Authorization: <AUTH>' \ -d '{ "services": [ { "service": { "id": "b135b4f4-d0de-40cb-8447-f963689df81b", "revision": "11", "onlineBooking": { "enabled": true } }, "mask": "onlineBooking.enabled" }, { "service": { "id": "f07ca3ab-672d-4281-936b-88e8e071d155", "revision": "10", "hidden": true }, "mask": "hidden" } ] "returnEntity": false }'
Response
JSON
{ "results": [ { "itemMetadata": { "id": "b135b4f4-d0de-40cb-8447-f963689df81b", "originalIndex": 0, "success": true } }, { "itemMetadata": { "id": "f07ca3ab-672d-4281-936b-88e8e071d155", "originalIndex": 1, "success": true } } ], "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.

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