# UpdateTaxRule

Update a single tax rule

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

**API:** AvaTax API
**Tag:** TaxRules
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Content-Type:** `application/json`
**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/UpdateTaxRule/

## Description

Replace the existing custom tax rule object at this URL with an updated object.
            
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 this tax rule belongs to. |
| `id` | integer | path | Yes | The ID of the tax rule you wish to update |
| `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/) . |

## Request Body

**Schema:** `TaxRuleModel`

Represents a tax rule that changes the behavior of Avalara's tax engine for certain products and/or entity use codes
in certain jurisdictions.
            
Avalara supports a few different types of tax rules.  For information about tax rule types, see
[TaxRuleTypeId](https://developer.avalara.com/api-reference/avatax/rest/v2/models/enums/TaxRuleTypeId/)
            
Because different types of tax rules have different behavior, some fields may change their behavior based on
the type of tax rule selected.  Please read the documentation for each field carefully and ensure that
the value you send is appropriate for the type of tax rule.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | **Yes** | The unique ID number of this tax rule. Example: `56789`. |
| `companyId` | integer | No | The unique ID number of the company that owns this tax rule. Example: `12345`. |
| `taxCodeId` | integer | No | For rules that apply to a specific tax code only, this specifies which tax code is affected by this rule.
            
You can choose to specify a tax code either by passing its unique ID number in the `taxCodeId` field or
by passing its alphanumeric code in the `taxCode` field.  To search for the appropriate tax code for your
custom rule, use the `ListTaxCodes` API.
            
The `RateOverrideRule`, `BaseRule`, and `ExemptEntityRule` rule types can be applied to all tax codes.  To
make a rule that applies to all tax codes, leave both fields blank.
            
The `ProductTaxabilityRule` rule must be associated with a tax code.  If you attempt to create a product taxability rule
without a tax code, you will get an error message. |
| `taxCode` | string | No | For rules that apply to a specific tax code only, this specifies which tax code is affected by this rule.
            
You can choose to specify a tax code either by passing its unique ID number in the `taxCodeId` field or
by passing its alphanumeric code in the `taxCode` field.  To search for the appropriate tax code for your
custom rule, use the `ListTaxCodes` API.
            
The `RateOverrideRule`, `BaseRule`, and `ExemptEntityRule` rule types can be applied to all tax codes.  To
make a rule that applies to all tax codes, leave both fields blank.
            
The `ProductTaxabilityRule` rule must be associated with a tax code.  If you attempt to create a product taxability rule
without a tax code, you will get an error message. Example: `FR020800`. |
| `stateFIPS` | string | No | For U.S. tax rules, this is the state's Federal Information Processing Standard (FIPS) code.
            
This field is required for rules that apply to specific jurisdictions in the United States.  It is not required
if you set the `isAllJuris` flag to true. Example: `04`. |
| `jurisName` | string | No | The name of the jurisdiction to which this tax rule applies.
            
Custom tax rules can apply to a specific jurisdiction or to all jurisdictions.  To select a jurisdiction, use the
[ListJurisdictions API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictions/)
or the [ListJurisdictionsByAddress API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictionsByAddress/).
To set a rule that applies to all jurisdictions of a specific type, see `isAllJuris`.
            
Once you have determined which jurisdiction you wish to assign to the tax rule, you should fill in the `jurisName`, `jurisCode`, and
`jurisdictionTypeId` fields using the information you retrieved from the API above. Example: `MARICOPA`. |
| `jurisCode` | string | **Yes** | The code of the jurisdiction to which this tax rule applies.
            
Custom tax rules can apply to a specific jurisdiction or to all jurisdictions.  To select a jurisdiction, use the
[ListJurisdictions API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictions/)
or the [ListJurisdictionsByAddress API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictionsByAddress/).
            
Once you have determined which jurisdiction you wish to assign to the tax rule, you should fill in the `jurisName`, `jurisCode`, and
`jurisdictionTypeId` fields using the information you retrieved from the API above. Example: `013`. |
| `jurisTypeId` | string | No | DEPRECATED - Date: 12/20/2017, Version: 18.1, Message: Please use `jurisdictionTypeId` instead. Values: `STA`, `CTY`, `CIT`, `STJ`, `CNT`. Example: `STA`. |
| `jurisdictionTypeId` | string | No | The type of the jurisdiction to which this tax rule applies.
            
Custom tax rules can apply to a specific jurisdiction or to all jurisdictions.  To select a jurisdiction, use the
[ListJurisdictions API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictions/)
or the [ListJurisdictionsByAddress API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictionsByAddress/).
            
Once you have determined which jurisdiction you wish to assign to the tax rule, you should fill in the `jurisName`, `jurisCode`, and
`jurisdictionTypeId` fields using the information you retrieved from the API above.
            
To make a custom tax rule for US or Canada that applies to all jurisdictions of a specific type, see the `isAllJuris`
field for more information. Values: `Country`, `State`, `County`, `City`, `Special`. Example: `Country`. |
| `customerUsageType` | string | No | DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use `entityUseCode` instead. |
| `entityUseCode` | string | No | The entity use code to which this rule applies.
            
You can create custom `entityUseCode` values with specific behavior using this API, or you can change
the behavior of Avalara's system-defined entity use codes.
            
For a full list of Avalara-defined entity use codes, see the [ListEntityUseCodes API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListEntityUseCodes/). |
| `taxTypeId` | string | No | DEPRECATED - Date: 09/30/2021, Version: 21.9.0, Message: Please use `taxTypeCode` instead.
Some tax type groups contain multiple different types of tax.  To create a rule that affects only one
type of tax within a tax type group, set this value to the code matching the specific tax type within
that group.  The custom tax rule will then only apply to taxes calculated for that specific type.
            
For rules that affect all tax types, use the value `A` to match `All` tax types within that group. Values: `E`, `Lodging`, `Bottle`, `RentToOwn`, `BikeTax`, `LandedCost`, `CheckoutBag`, `Alcohol`, `Amusement`, `Hospitality`, `RentalLeasing`, `GrossReceipts`, `Mattress`, `Lumber`, `Paint`, `Tires`, `EI`, `All`, `BothSalesAndUseTax`, `ConsumerUseTax`, `ConsumersUseAndSellersUseTax`, `ConsumerUseAndSalesTax`, `Fee`, `VATInputTax`, `LightBulbs`, `Meals`, `VATNonrecoverableInputTax`, `VATOutputTax`, `PIF`, `Rental`, `SalesTax`, `UseTax`, `EWaste`, `Batteries`. Example: `E`. |
| `taxTypeCode` | string | No | Indicates the code of the tax type that applies to this rule. Use /api/v2/definitions/taxtypes endpoint to retrieve the list of tax types applicable for your company. Example: `ALL`. |
| `taxRuleProductDetail` | TaxRuleProductDetailModel[] | No | TaxRule Product Detail indicates the HSCode(s) to which the tax rule applies. |
| `rateTypeId` | string | No | DEPRECATED - Date: 8/27/2018, Version: 18.9, Message: Please use `rateTypeCode`, `taxTypeGroup` and `subTaxType` instead. Values: `ReducedA`, `ReducedB`, `Food`, `General`, `IncreasedStandard`, `LinenRental`, `Medical`, `Construction`, `Parking`, `SuperReduced`, `ReducedR`, `Standard`, `Leasing`, `LeasingLow`, `Services`, `Zero`. Example: `ReducedA`. |
| `rateTypeCode` | string | No | Indicates the code of the rate type that applies to this rule.  Use [ListRateTypesByCountry](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListRateTypesByCountry/) API for a full list of rate type codes.
            
If you specify a value in the rateTypeCode field, this rule will cause tax lines that are affected by the rule
to change to a different rate type code. |
| `taxRuleTypeId` | string | **Yes** | This type value determines the behavior of the tax rule.
            
You can specify that this rule controls the product's taxability or exempt / nontaxable status, the product's rate
(for example, if you have been granted an official ruling for your product's rate that differs from the official rate),
or other types of behavior. Values: `RateRule`, `RateOverrideRule`, `BaseRule`, `ExemptEntityRule`, `ProductTaxabilityRule`, `NexusRule`, `RateCapRule`, `TaxOverrideRule`, `FeeRule`, `OtherRule`. Example: `RateRule`. |
| `isAllJuris` | boolean | No | Allows you to make tax rules apply to lower jurisdictions.  This feature is only available in the United States and Canada.
            
* In the United States, this value can be used for rules written at the `State` jurisdictional level.  If set to `true`, this rule will at the state level, county level, city level, and special jurisdiction level.
* In Canada, this value can be used for rules written at the `Country` or `State` jurisdictional levels.  If set to `true`, this rule will at all lower jurisdictional levels.
            
For any other use case, this value must be `false`. Example: `false`. |
| `value` | number | No | This field has different behavior based on the type of the tax rule.
            
* For a product taxability rule, this value is either 1 or 0, indicating taxable or non-taxable.
* For a rate override rule, this value is the corrected rate stored as a decimal, for example, a rate of 5% would be stored as 0.05 decimal.  If you use the special value of 1.0, only the cap and threshold values will be applied and the rate will be left alone. Example: `0`. |
| `cap` | number | No | The maximum cap for the price of this item according to this rule.  Any amount above this cap will not be subject to this rule.
            
For example, if you must pay 5% of a product's value up to a maximum value of $1000, you would set the `cap` to `1000.00` and the `value` to `0.05`. Example: `0`. |
| `threshold` | number | No | The per-unit threshold that must be met before this rule applies.
            
For example, if your product is nontaxable unless it is above $100 per product, you would set the `threshold` value to `100`.  In this case, the rate
for the rule would apply to the entire amount above $100.
            
You can also create rules that make the entire product taxable if it exceeds a threshold, but is nontaxable
if it is below the threshold.  To choose this, set the `options` field to the value `TaxAll`. Example: `0`. |
| `options` | string | No | Supports custom options for your tax rule.
            
Supported options include:
* `TaxAll` - This value indicates that the entire amount of the line becomes taxable when the line amount exceeds the `threshold`. |
| `effectiveDate` | string | No | The first date at which this rule applies.  If `null`, this rule will apply to all dates prior to the end date. Example: `2026-07-02T00:00:00+00:00`. |
| `endDate` | string | No | The last date for which this rule applies.  If `null`, this rule will apply to all dates after the effective date. |
| `description` | string | No | A friendly name for this tax rule. Example: `Freight`. |
| `countyFIPS` | string | No | For U.S. tax rules, this is the county's Federal Information Processing Standard (FIPS) code.
            
This field is required for rules that apply to specific jurisdictions in the United States.  It is not required
if you set the `isAllJuris` flag to true. Example: `013`. |
| `isSTPro` | boolean | No | DEPRECATED - Date: 8/27/2018, Version: 18.9, Message: This field is no longer required. |
| `country` | string | **Yes** | Name or ISO 3166 code identifying the country where this rule will apply.
            
This field supports many different country identifiers:
 * Two character ISO 3166 codes
 * Three character ISO 3166 codes
 * Fully spelled out names of the country in ISO supported languages
 * Common alternative spellings for many countries
            
For a full list of all supported codes and names, please see the Definitions API `ListCountries`. Example: `US`. |
| `region` | string | No | Name or ISO 3166 code identifying the region where this rule will apply.
            
This field supports many different region identifiers:
 * Two and three character ISO 3166 region codes
 * Fully spelled out names of the region in ISO supported languages
 * Common alternative spellings for many regions
            
For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
NOTE: Region is required for US and not required for non-US countries because the user may be either creating a Country-level or Region-level rule. Example: `AZ`. |
| `sourcing` | string | No | The sourcing types to which this rule applies. Values: `Mixed`, `Destination`, `Origin`. Example: `Mixed`. |
| `taxTypeGroup` | string | No | This field has different behavior based on the type of rule.
            
* For a product taxability rule, if the rule applies to an item, this value will override the tax type group of the original product.
* For other rules, this value determines what tax type groups will be affected by the rule.
            
Refer to `ListTaxTypeGroups` for a list of tax type groups supported by AvaTax. Example: `SalesAndUse`. |
| `taxSubType` | string | No | This field has different behavior based on the type of rule.
            
* For a product taxability rule, if the rule applies to an item, this value will override the tax sub type of the original product.
* For other rules, this value determines what tax sub types will be affected by the rule.
            
Refer to `ListTaxSubtypes` for a list of tax sub types supported by AvaTax. Example: `ALL`. |
| `nonPassthroughExpression` | string | No | Reserved for Avalara internal usage.  Leave this field null. |
| `currencyCode` | string | No | The currency code to use for this rule.
            
For a list of currencies supported by AvaTax, use the [ListCurrencies API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListCurrencies/). |
| `preferredProgramId` | integer | No | Reserved for Avalara internal usage.  Leave this field null. |
| `uomId` | integer | No | For tax rules that are calculated using units of measurement, this indicates the unit of measurement type
used to calculate the amounts for this rule.
            
For a list of units of measurement, use the [ListUnitsOfMeasurement API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListUnitOfMeasurement/). |
| `createdDate` | string | No | The date when this record was created. |
| `createdUserId` | integer | No | The User ID of the user who created this record. |
| `modifiedDate` | string | No | The date/time when this record was last modified. |
| `modifiedUserId` | integer | No | The user ID of the user who last modified this record. |
| `unitOfBasis` | string | No | The UnitOfBasis for the TaxRule |

## Responses

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

### 200 Response: `TaxRuleModel`

Represents a tax rule that changes the behavior of Avalara's tax engine for certain products and/or entity use codes
in certain jurisdictions.
            
Avalara supports a few different types of tax rules.  For information about tax rule types, see
[TaxRuleTypeId](https://developer.avalara.com/api-reference/avatax/rest/v2/models/enums/TaxRuleTypeId/)
            
Because different types of tax rules have different behavior, some fields may change their behavior based on
the type of tax rule selected.  Please read the documentation for each field carefully and ensure that
the value you send is appropriate for the type of tax rule.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | **Yes** | The unique ID number of this tax rule. Example: `56789`. |
| `companyId` | integer | No | The unique ID number of the company that owns this tax rule. Example: `12345`. |
| `taxCodeId` | integer | No | For rules that apply to a specific tax code only, this specifies which tax code is affected by this rule.
            
You can choose to specify a tax code either by passing its unique ID number in the `taxCodeId` field or
by passing its alphanumeric code in the `taxCode` field.  To search for the appropriate tax code for your
custom rule, use the `ListTaxCodes` API.
            
The `RateOverrideRule`, `BaseRule`, and `ExemptEntityRule` rule types can be applied to all tax codes.  To
make a rule that applies to all tax codes, leave both fields blank.
            
The `ProductTaxabilityRule` rule must be associated with a tax code.  If you attempt to create a product taxability rule
without a tax code, you will get an error message. |
| `taxCode` | string | No | For rules that apply to a specific tax code only, this specifies which tax code is affected by this rule.
            
You can choose to specify a tax code either by passing its unique ID number in the `taxCodeId` field or
by passing its alphanumeric code in the `taxCode` field.  To search for the appropriate tax code for your
custom rule, use the `ListTaxCodes` API.
            
The `RateOverrideRule`, `BaseRule`, and `ExemptEntityRule` rule types can be applied to all tax codes.  To
make a rule that applies to all tax codes, leave both fields blank.
            
The `ProductTaxabilityRule` rule must be associated with a tax code.  If you attempt to create a product taxability rule
without a tax code, you will get an error message. Example: `FR020800`. |
| `stateFIPS` | string | No | For U.S. tax rules, this is the state's Federal Information Processing Standard (FIPS) code.
            
This field is required for rules that apply to specific jurisdictions in the United States.  It is not required
if you set the `isAllJuris` flag to true. Example: `04`. |
| `jurisName` | string | No | The name of the jurisdiction to which this tax rule applies.
            
Custom tax rules can apply to a specific jurisdiction or to all jurisdictions.  To select a jurisdiction, use the
[ListJurisdictions API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictions/)
or the [ListJurisdictionsByAddress API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictionsByAddress/).
To set a rule that applies to all jurisdictions of a specific type, see `isAllJuris`.
            
Once you have determined which jurisdiction you wish to assign to the tax rule, you should fill in the `jurisName`, `jurisCode`, and
`jurisdictionTypeId` fields using the information you retrieved from the API above. Example: `MARICOPA`. |
| `jurisCode` | string | **Yes** | The code of the jurisdiction to which this tax rule applies.
            
Custom tax rules can apply to a specific jurisdiction or to all jurisdictions.  To select a jurisdiction, use the
[ListJurisdictions API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictions/)
or the [ListJurisdictionsByAddress API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictionsByAddress/).
            
Once you have determined which jurisdiction you wish to assign to the tax rule, you should fill in the `jurisName`, `jurisCode`, and
`jurisdictionTypeId` fields using the information you retrieved from the API above. Example: `013`. |
| `jurisTypeId` | string | No | DEPRECATED - Date: 12/20/2017, Version: 18.1, Message: Please use `jurisdictionTypeId` instead. Values: `STA`, `CTY`, `CIT`, `STJ`, `CNT`. Example: `STA`. |
| `jurisdictionTypeId` | string | No | The type of the jurisdiction to which this tax rule applies.
            
Custom tax rules can apply to a specific jurisdiction or to all jurisdictions.  To select a jurisdiction, use the
[ListJurisdictions API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictions/)
or the [ListJurisdictionsByAddress API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListJurisdictionsByAddress/).
            
Once you have determined which jurisdiction you wish to assign to the tax rule, you should fill in the `jurisName`, `jurisCode`, and
`jurisdictionTypeId` fields using the information you retrieved from the API above.
            
To make a custom tax rule for US or Canada that applies to all jurisdictions of a specific type, see the `isAllJuris`
field for more information. Values: `Country`, `State`, `County`, `City`, `Special`. Example: `Country`. |
| `customerUsageType` | string | No | DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use `entityUseCode` instead. |
| `entityUseCode` | string | No | The entity use code to which this rule applies.
            
You can create custom `entityUseCode` values with specific behavior using this API, or you can change
the behavior of Avalara's system-defined entity use codes.
            
For a full list of Avalara-defined entity use codes, see the [ListEntityUseCodes API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListEntityUseCodes/). |
| `taxTypeId` | string | No | DEPRECATED - Date: 09/30/2021, Version: 21.9.0, Message: Please use `taxTypeCode` instead.
Some tax type groups contain multiple different types of tax.  To create a rule that affects only one
type of tax within a tax type group, set this value to the code matching the specific tax type within
that group.  The custom tax rule will then only apply to taxes calculated for that specific type.
            
For rules that affect all tax types, use the value `A` to match `All` tax types within that group. Values: `E`, `Lodging`, `Bottle`, `RentToOwn`, `BikeTax`, `LandedCost`, `CheckoutBag`, `Alcohol`, `Amusement`, `Hospitality`, `RentalLeasing`, `GrossReceipts`, `Mattress`, `Lumber`, `Paint`, `Tires`, `EI`, `All`, `BothSalesAndUseTax`, `ConsumerUseTax`, `ConsumersUseAndSellersUseTax`, `ConsumerUseAndSalesTax`, `Fee`, `VATInputTax`, `LightBulbs`, `Meals`, `VATNonrecoverableInputTax`, `VATOutputTax`, `PIF`, `Rental`, `SalesTax`, `UseTax`, `EWaste`, `Batteries`. Example: `E`. |
| `taxTypeCode` | string | No | Indicates the code of the tax type that applies to this rule. Use /api/v2/definitions/taxtypes endpoint to retrieve the list of tax types applicable for your company. Example: `ALL`. |
| `taxRuleProductDetail` | TaxRuleProductDetailModel[] | No | TaxRule Product Detail indicates the HSCode(s) to which the tax rule applies. |
| `rateTypeId` | string | No | DEPRECATED - Date: 8/27/2018, Version: 18.9, Message: Please use `rateTypeCode`, `taxTypeGroup` and `subTaxType` instead. Values: `ReducedA`, `ReducedB`, `Food`, `General`, `IncreasedStandard`, `LinenRental`, `Medical`, `Construction`, `Parking`, `SuperReduced`, `ReducedR`, `Standard`, `Leasing`, `LeasingLow`, `Services`, `Zero`. Example: `ReducedA`. |
| `rateTypeCode` | string | No | Indicates the code of the rate type that applies to this rule.  Use [ListRateTypesByCountry](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListRateTypesByCountry/) API for a full list of rate type codes.
            
If you specify a value in the rateTypeCode field, this rule will cause tax lines that are affected by the rule
to change to a different rate type code. |
| `taxRuleTypeId` | string | **Yes** | This type value determines the behavior of the tax rule.
            
You can specify that this rule controls the product's taxability or exempt / nontaxable status, the product's rate
(for example, if you have been granted an official ruling for your product's rate that differs from the official rate),
or other types of behavior. Values: `RateRule`, `RateOverrideRule`, `BaseRule`, `ExemptEntityRule`, `ProductTaxabilityRule`, `NexusRule`, `RateCapRule`, `TaxOverrideRule`, `FeeRule`, `OtherRule`. Example: `RateRule`. |
| `isAllJuris` | boolean | No | Allows you to make tax rules apply to lower jurisdictions.  This feature is only available in the United States and Canada.
            
* In the United States, this value can be used for rules written at the `State` jurisdictional level.  If set to `true`, this rule will at the state level, county level, city level, and special jurisdiction level.
* In Canada, this value can be used for rules written at the `Country` or `State` jurisdictional levels.  If set to `true`, this rule will at all lower jurisdictional levels.
            
For any other use case, this value must be `false`. Example: `false`. |
| `value` | number | No | This field has different behavior based on the type of the tax rule.
            
* For a product taxability rule, this value is either 1 or 0, indicating taxable or non-taxable.
* For a rate override rule, this value is the corrected rate stored as a decimal, for example, a rate of 5% would be stored as 0.05 decimal.  If you use the special value of 1.0, only the cap and threshold values will be applied and the rate will be left alone. Example: `0`. |
| `cap` | number | No | The maximum cap for the price of this item according to this rule.  Any amount above this cap will not be subject to this rule.
            
For example, if you must pay 5% of a product's value up to a maximum value of $1000, you would set the `cap` to `1000.00` and the `value` to `0.05`. Example: `0`. |
| `threshold` | number | No | The per-unit threshold that must be met before this rule applies.
            
For example, if your product is nontaxable unless it is above $100 per product, you would set the `threshold` value to `100`.  In this case, the rate
for the rule would apply to the entire amount above $100.
            
You can also create rules that make the entire product taxable if it exceeds a threshold, but is nontaxable
if it is below the threshold.  To choose this, set the `options` field to the value `TaxAll`. Example: `0`. |
| `options` | string | No | Supports custom options for your tax rule.
            
Supported options include:
* `TaxAll` - This value indicates that the entire amount of the line becomes taxable when the line amount exceeds the `threshold`. |
| `effectiveDate` | string | No | The first date at which this rule applies.  If `null`, this rule will apply to all dates prior to the end date. Example: `2026-07-02T00:00:00+00:00`. |
| `endDate` | string | No | The last date for which this rule applies.  If `null`, this rule will apply to all dates after the effective date. |
| `description` | string | No | A friendly name for this tax rule. Example: `Freight`. |
| `countyFIPS` | string | No | For U.S. tax rules, this is the county's Federal Information Processing Standard (FIPS) code.
            
This field is required for rules that apply to specific jurisdictions in the United States.  It is not required
if you set the `isAllJuris` flag to true. Example: `013`. |
| `isSTPro` | boolean | No | DEPRECATED - Date: 8/27/2018, Version: 18.9, Message: This field is no longer required. |
| `country` | string | **Yes** | Name or ISO 3166 code identifying the country where this rule will apply.
            
This field supports many different country identifiers:
 * Two character ISO 3166 codes
 * Three character ISO 3166 codes
 * Fully spelled out names of the country in ISO supported languages
 * Common alternative spellings for many countries
            
For a full list of all supported codes and names, please see the Definitions API `ListCountries`. Example: `US`. |
| `region` | string | No | Name or ISO 3166 code identifying the region where this rule will apply.
            
This field supports many different region identifiers:
 * Two and three character ISO 3166 region codes
 * Fully spelled out names of the region in ISO supported languages
 * Common alternative spellings for many regions
            
For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
NOTE: Region is required for US and not required for non-US countries because the user may be either creating a Country-level or Region-level rule. Example: `AZ`. |
| `sourcing` | string | No | The sourcing types to which this rule applies. Values: `Mixed`, `Destination`, `Origin`. Example: `Mixed`. |
| `taxTypeGroup` | string | No | This field has different behavior based on the type of rule.
            
* For a product taxability rule, if the rule applies to an item, this value will override the tax type group of the original product.
* For other rules, this value determines what tax type groups will be affected by the rule.
            
Refer to `ListTaxTypeGroups` for a list of tax type groups supported by AvaTax. Example: `SalesAndUse`. |
| `taxSubType` | string | No | This field has different behavior based on the type of rule.
            
* For a product taxability rule, if the rule applies to an item, this value will override the tax sub type of the original product.
* For other rules, this value determines what tax sub types will be affected by the rule.
            
Refer to `ListTaxSubtypes` for a list of tax sub types supported by AvaTax. Example: `ALL`. |
| `nonPassthroughExpression` | string | No | Reserved for Avalara internal usage.  Leave this field null. |
| `currencyCode` | string | No | The currency code to use for this rule.
            
For a list of currencies supported by AvaTax, use the [ListCurrencies API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListCurrencies/). |
| `preferredProgramId` | integer | No | Reserved for Avalara internal usage.  Leave this field null. |
| `uomId` | integer | No | For tax rules that are calculated using units of measurement, this indicates the unit of measurement type
used to calculate the amounts for this rule.
            
For a list of units of measurement, use the [ListUnitsOfMeasurement API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListUnitOfMeasurement/). |
| `createdDate` | string | No | The date when this record was created. |
| `createdUserId` | integer | No | The User ID of the user who created this record. |
| `modifiedDate` | string | No | The date/time when this record was last modified. |
| `modifiedUserId` | integer | No | The user ID of the user who last modified this record. |
| `unitOfBasis` | string | No | The UnitOfBasis for the TaxRule |

## Example Request

```bash
curl -X PUT "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/taxrules/{id}" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "id": 56789,
  "companyId": 12345,
  "taxCode": "FR020800",
  "stateFIPS": "04",
  "jurisName": "MARICOPA",
  "jurisCode": "013",
  "jurisTypeId": 0,
  "jurisdictionTypeId": "County",
  "taxTypeId": "BothSalesAndUseTax",
  "taxTypeCode": "ALL",
  "taxRuleTypeId": "ProductTaxabilityRule",
  "isAllJuris": false,
  "value": 0,
  "cap": 0,
  "threshold": 0,
  "effectiveDate": "2026-07-02",
  "description": "Freight",
  "countyFIPS": "013",
  "country": "US",
  "region": "AZ",
  "taxTypeGroup": "SalesAndUse",
  "taxSubType": "ALL"
}'
```