# UpsertItemParameter

Add/update an item parameter.

`PUT /api/v2/companies/{companyId}/items/{itemId}/parameters`

**API:** AvaTax API
**Tag:** Items
**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/Items/UpsertItemParameter/

## Description

Add/update an item parameter.
            
Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
            
A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
            
A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
            
Please provide all the countries parameter values as a valid two letter ISO-3166 country code.
Refer to 'ListCountries' api to get valid country code for any country if needed.

### Security Policies

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

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The ID of the company that this item belongs to. |
| `itemId` | integer | path | Yes | The ID of the item you want 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:** `ItemParameterModel[]`

Represents a parameter associated with an item.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | The id of the parameter. Example: `0`. |
| `name` | string | **Yes** | The parameter's name. Example: `ScreenSize`. |
| `value` | string | **Yes** | The value for the parameter. Example: `24`. |
| `unit` | string | No | The unit of measurement code for the parameter. Example: `inch`. |
| `itemId` | integer | No | The item id |
| `isNeededForCalculation` | boolean | No | This field identifies if parameter is needed for calculation |
| `isNeededForReturns` | boolean | No | This field identifies if parameter is needed for returns |
| `isNeededForClassification` | boolean | No | This field identifies if parameter is needed for classification |

## Responses

| Status | Description | Schema |
|---|---|---|
| 201 | Created |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

## Example Request

```bash
curl -X PUT "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/items/{itemId}/parameters" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '[
  {
    "id": 0,
    "name": "ScreenSize",
    "value": "24",
    "unit": "inch"
  }
]'
```