> 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 # DeleteRule # Package: serviceFees # Namespace: ServiceFeesRules # Method link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/service-fees/rules/delete-rule.md ## Permission Scopes: Manage Restaurants - all permissions: SCOPE.RESTAURANTS.MEGA-SCOPES ## Introduction Deletes a rule. To delete multiple rules at once, use [Bulk Delete Rules](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/service-fees/rules/bulk-delete-rules.md). --- ## REST API ### Schema ``` Method: deleteRule Description: Deletes a rule. To delete multiple rules at once, use [Bulk Delete Rules](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/service-fees/rules/bulk-delete-rules.md). URL: https://www.wixapis.com/service-fees/v1/rules/{ruleId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: ruleId Method parameters: param name: ruleId | type: none | required: true Return type: DeleteRuleResponse EMPTY-OBJECT {} ``` ### Examples ### Delete a rule ```curl curl -X DELETE https://www.wixapis.com/service-fees-rules/v1/rules/4aea505e-ac49-4f72-b4f1-b07c064a20cd \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.serviceFees.ServiceFeesRules.deleteRule(ruleId) Description: Deletes a rule. To delete multiple rules at once, use [Bulk Delete Rules](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/service-fees/rules/bulk-delete-rules.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: ruleId Method parameters: param name: ruleId | type: string | description: GUID of the rule to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteRule ```javascript import { serviceFees } from '@wix/restaurants'; async function deleteRule(ruleId) { const response = await serviceFees.deleteRule(ruleId); }; ``` ### deleteRule (with elevated permissions) ```javascript import { serviceFees } from '@wix/restaurants'; import { auth } from '@wix/essentials'; async function myDeleteRuleMethod(ruleId) { const elevatedDeleteRule = auth.elevate(serviceFees.deleteRule); const response = await elevatedDeleteRule(ruleId); } ``` ### deleteRule (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 { serviceFees } from '@wix/restaurants'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { serviceFees }, // Include the auth strategy and host as relevant }); async function deleteRule(ruleId) { const response = await myWixClient.serviceFees.deleteRule(ruleId); }; ``` ---