> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # DeleteResource # Package: resources # Namespace: ResourcesService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/delete-resource.md ## Permission Scopes: Manage Bookings: SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS ## Introduction Deletes a resource. Deleting a resource cancels its event schedule and all its working hour schedules that aren't shared with another resource. Learn more about [how Bookings uses the Calendar APIs](https://dev.wix.com/docs/api-reference/business-management/calendar/wix-bookings-integration.md). --- ## REST API ### Schema ``` Method: deleteResource Description: Deletes a resource. Deleting a resource cancels its event schedule and all its working hour schedules that aren't shared with another resource. Learn more about [how Bookings uses the Calendar APIs](https://dev.wix.com/docs/api-reference/business-management/calendar/wix-bookings-integration.md). URL: https://www.wixapis.com/bookings/v2/resources/{resourceId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: resourceId Method parameters: param name: resourceId | type: none | required: true Return type: DeleteResourceResponse EMPTY-OBJECT {} ``` ### Examples ### Delete a resource. ```curl curl -X DELETE \ 'https://www.wixapis.com/bookings/v2/resources/ffedf9dc-932d-439f-b1f4-e42b2a5a8bb5' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.resources.ResourcesService.deleteResource(resourceId) Description: Deletes a resource. Deleting a resource cancels its event schedule and all its working hour schedules that aren't shared with another resource. Learn more about [how Bookings uses the Calendar APIs](https://dev.wix.com/docs/api-reference/business-management/calendar/wix-bookings-integration.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: resourceId Method parameters: param name: resourceId | type: string | description: GUID of the resource to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteResource ```javascript import { resources } from '@wix/bookings'; async function deleteResource(resourceId) { const response = await resources.deleteResource(resourceId); }; ``` ### deleteResource (with elevated permissions) ```javascript import { resources } from '@wix/bookings'; import { auth } from '@wix/essentials'; async function myDeleteResourceMethod(resourceId) { const elevatedDeleteResource = auth.elevate(resources.deleteResource); const response = await elevatedDeleteResource(resourceId); } ``` ### deleteResource (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { resources } from '@wix/bookings'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { resources }, // Include the auth strategy and host as relevant }); async function deleteResource(resourceId) { const response = await myWixClient.resources.deleteResource(resourceId); }; ``` ---