# UpdateItem

Update a single item

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

**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/UpdateItem/

## Description

Replace the existing `Item` object at this URL with an updated object.
            
Items are a way of separating your tax calculation process from your tax configuration details.  If you choose, you
can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
and other data fields.  AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
from the item table instead.  This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
            
All data from the existing object will be replaced with data in the object you PUT.  To set a field's value to null,
you may either set its value to null or omit that field from the object you post.
            
The tax code takes precedence over the tax code id if both are provided.

### 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. |
| `id` | integer | path | Yes | The ID of the item you wish to update |
| `isRecommendationSelected` | boolean | query | No | If true then Set recommendation status to RecommendationSelected |
| `isRecommendationRejected` | boolean | query | No | If true then Set recommendation status to RecommendationRejected, When the taxCode recommendation status is RecommendationAvailable. Else will be thrown as error |
| `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:** `ItemModel`

Represents an item in your company's product catalog.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | **Yes** | The unique ID number of this item. Example: `0`. |
| `companyId` | integer | No | The unique ID number of the company that owns this item. Example: `0`. |
| `itemCode` | string | **Yes** | A unique code representing this item. Example: `CERMUG`. |
| `taxCodeId` | integer | No | The unique ID number of the tax code that is applied when selling this item.
When creating or updating an item, you can either specify the Tax Code ID number or the Tax Code string;
you do not need to specify both values. |
| `taxCode` | string | No | The unique code string of the Tax Code that is applied when selling this item.
When creating or updating an item, you can either specify the Tax Code ID number or the Tax Code string;
you do not need to specify both values. Example: `P0000000`. |
| `description` | string | **Yes** | A friendly description of this item in your product catalog. Example: `Ceramic Mug`. |
| `itemGroup` | string | No | A way to group similar items. Example: `Mugs`. |
| `category` | string | No | A category of product Example: `Home > Kitchen > Mugs`. |
| `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. |
| `source` | string | No | Source of creation of this. Example: `MTCC`. |
| `sourceEntityId` | string | No | The unique identifier of this item at the source |
| `itemType` | string | No | Type of item |
| `upc` | string | No | Universal unique code for item
            
Deprecated - As of 6/25/2024, this field is deprecated. Instead of using this field, you can pass this value as a parameter. `The parameter name is UPC`. |
| `summary` | string | No | Long Summary for Item
            
Deprecated - As of 6/25/2024, this field is deprecated. Instead of using this field, you can pass this value as a parameter. `The parameter name is Summary`. |
| `classifications` | ClassificationModel[] | No | List of classifications that belong to this item.
A single classification consists of a productCode and a systemCode for a particular item.
            
Please note: `taxCode` (ProductCode for SystemCode `AVATAXCODE`) is being removed from `classifications`. You can still find it in the `taxCode` field. |
| `parameters` | ItemParameterModel[] | No | List of item parameters. |
| `customParameters` | ItemCustomParametersModel[] | No | List of item custom parameters |
| `tags` | ItemTagDetailInputModel[] | No | List of item tags. |
| `properties` | object | No | Additional key-description of the product. |
| `itemStatus` | ItemStatusOutputModel[] | No | List of item status |
| `taxCodeRecommendationStatus` | TaxCodeRecommendationStatusOutputModel | No | Item tax code recommendation status |
| `taxCodeRecommendations` | TaxCodeRecommendationOutputModel[] | No | Item tax code recommendations |
| `taxCodeDetails` | ItemTaxCodeDetailsOutputModel | No | taxCode details for the item |
| `hsCodeClassificationStatus` | ItemHSCodeClassificationStatusModel[] | No | List of item parameters |
| `image` | ItemImageDetailsModel | No | Item image of an item |

## Responses

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

### 200 Response: `ItemModel`

Represents an item in your company's product catalog.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | **Yes** | The unique ID number of this item. Example: `0`. |
| `companyId` | integer | No | The unique ID number of the company that owns this item. Example: `0`. |
| `itemCode` | string | **Yes** | A unique code representing this item. Example: `CERMUG`. |
| `taxCodeId` | integer | No | The unique ID number of the tax code that is applied when selling this item.
When creating or updating an item, you can either specify the Tax Code ID number or the Tax Code string;
you do not need to specify both values. |
| `taxCode` | string | No | The unique code string of the Tax Code that is applied when selling this item.
When creating or updating an item, you can either specify the Tax Code ID number or the Tax Code string;
you do not need to specify both values. Example: `P0000000`. |
| `description` | string | **Yes** | A friendly description of this item in your product catalog. Example: `Ceramic Mug`. |
| `itemGroup` | string | No | A way to group similar items. Example: `Mugs`. |
| `category` | string | No | A category of product Example: `Home > Kitchen > Mugs`. |
| `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. |
| `source` | string | No | Source of creation of this. Example: `MTCC`. |
| `sourceEntityId` | string | No | The unique identifier of this item at the source |
| `itemType` | string | No | Type of item |
| `upc` | string | No | Universal unique code for item
            
Deprecated - As of 6/25/2024, this field is deprecated. Instead of using this field, you can pass this value as a parameter. `The parameter name is UPC`. |
| `summary` | string | No | Long Summary for Item
            
Deprecated - As of 6/25/2024, this field is deprecated. Instead of using this field, you can pass this value as a parameter. `The parameter name is Summary`. |
| `classifications` | ClassificationModel[] | No | List of classifications that belong to this item.
A single classification consists of a productCode and a systemCode for a particular item.
            
Please note: `taxCode` (ProductCode for SystemCode `AVATAXCODE`) is being removed from `classifications`. You can still find it in the `taxCode` field. |
| `parameters` | ItemParameterModel[] | No | List of item parameters. |
| `customParameters` | ItemCustomParametersModel[] | No | List of item custom parameters |
| `tags` | ItemTagDetailInputModel[] | No | List of item tags. |
| `properties` | object | No | Additional key-description of the product. |
| `itemStatus` | ItemStatusOutputModel[] | No | List of item status |
| `taxCodeRecommendationStatus` | TaxCodeRecommendationStatusOutputModel | No | Item tax code recommendation status |
| `taxCodeRecommendations` | TaxCodeRecommendationOutputModel[] | No | Item tax code recommendations |
| `taxCodeDetails` | ItemTaxCodeDetailsOutputModel | No | taxCode details for the item |
| `hsCodeClassificationStatus` | ItemHSCodeClassificationStatusModel[] | No | List of item parameters |
| `image` | ItemImageDetailsModel | No | Item image of an item |

## Example Request

```bash
curl -X PUT "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/items/{id}" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "id": 0,
  "companyId": 0,
  "itemCode": "CERMUG",
  "taxCode": "P0000000",
  "description": "Ceramic Mug",
  "itemGroup": "Mugs",
  "category": "Home > Kitchen > Mugs",
  "source": "MTCC",
  "classifications": [
    {
      "id": 12212,
      "productCode": "9011900000",
      "systemCode": "TARIC",
      "country": "DE",
      "isPremium": false
    }
  ],
  "parameters": [
    {
      "id": 0,
      "name": "ScreenSize",
      "value": "24",
      "unit": "inch"
    },
    {
      "id": 0,
      "name": "UPC",
      "value": "123456789012"
    },
    {
      "id": 0,
      "name": "Summary",
      "value": "Ceramic mugs are popular vessels for enjoying hot beverages like coffee, tea, or hot chocolate. They're made from clay that's fired at high temperatures, which gives them durability and heat retention properties"
    }
  ],
  "customParameters": [
    {
      "id": 0,
      "name": "Material Used",
      "value": "Nylon"
    }
  ],
  "properties": {
    "color": "white"
  }
}'
```