POST

Bulk Delete Services


Deletes multiple services.

See Delete Service (SDK | REST) for more details about deleting a service.

The call succeeds even if one or more individual services can't be deleted. 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/delete

Body Params
idsArray <string>Requiredformat GUIDmaxItems 100

IDs of the services to delete.


preserveFutureSessionsWithParticipantsboolean

Whether to preserve future sessions with participants.

Default: false.


participantNotificationParticipantNotification

Whether to notify participants about the change and an optional custom message.

Response Object
resultsArray <BulkServiceResult>

The result of each service removal.


bulkActionMetadataBulkActionMetadata

Delete statistics.

Delete multiple services
Request
cURL
curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/delete' \ -H 'Authorization: <AUTH>' \ -d '{ "ids": [ "b135b4f4-d0de-40cb-8447-f963689df81b", "f07ca3ab-672d-4281-936b-88e8e071d155" ], "preserveFutureSessionsWithParticipants": false, "participantNotification": { "notifyParticipants": true } }'
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?