This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deletes a service.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function deleteService(
serviceId: string,
options: DeleteServiceOptions,
): Promise<void>;
ID of the service to delete.
Allows you to configure how to handle the deleted service's future sessions and how to notify the sessions participants.
import { services } from "wix-bookings.v2";
/*
* Sample serviceID value: 'ff61204b-b19a-5cc8-823b-7eed8ae5fc28'
*/
async function deleteService(serviceID) {
await services.deleteService(serviceID);
console.log("Deleted the service");
}
/* Promise resolves to void */
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.