Search...
deleteService( )
Developer Preview
Deletes a service.
Admin Method
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function deleteService(serviceId: string, options: DeleteServiceOptions): Promise<void>
deleteService Parameters
NAME
TYPE
DESCRIPTION
serviceId
string
ID of the service to delete.
options
Optional
DeleteServiceOptions
Allows you to configure how to handle the deleted service's future sessions and how to notify the sessions participants.
Returns
Return Type:
Promise<
void
>Was this helpful?
Delete a service @description:
Copy Code
1import { services } from 'wix-bookings.v2';23/*4 * Sample serviceID value: 'ff61204b-b19a-5cc8-823b-7eed8ae5fc28'5 */6async function deleteService(serviceID) {7 await services.deleteService(serviceID);8 console.log('Deleted the service');9}1011/* Promise resolves to void */12