# DeleteTaxRule

Delete a single tax rule

`DELETE /api/v2/companies/{companyId}/taxrules/{id}`

**API:** AvaTax API
**Tag:** TaxRules
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/avatax/api/methods/TaxRules/DeleteTaxRule/

## Description

Mark the custom tax rule identified by this URL as deleted.
            
A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction.  Custom tax rules
can be used to change the taxability of an item, to change the tax base of an item, or to change the tax rate
charged when selling an item.  Tax rules can also change tax behavior depending on the `entityUseCode` value submitted
with the transaction.
            
You can create custom tax rules to customize the behavior of AvaTax to match specific rules that are custom to your
business.  If you have obtained a ruling from a tax auditor that requires custom tax calculations, you can use
custom tax rules to redefine the behavior for your company or item.
            
Please use custom tax rules carefully and ensure that these tax rules match the behavior agreed upon with your
auditor, legal representative, and accounting team.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The ID of the company that owns this tax rule. |
| `id` | integer | path | Yes | The ID of the tax rule you wish to delete. |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

## Example Request

```bash
curl -X DELETE "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/taxrules/{id}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```