# SyncItemCatalogue

Create or update items from a product catalog.

`POST /api/v2/companies/{companyId}/itemcatalogue`

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

## Description

Creates/updates one or more item objects with additional properties and the AvaTax category attached to this company.
            
Recommended number of items to create/update in a single call is upto 100.
            
Currently, the maximum number of items that can be created/updated in a single call is 1000 (This limit is subject to change).
            
Items are a way of separating your tax calculation process from your tax configuration details. Use this endpoint to create
a new or update an existing item. This can be used to sync the items with Avalara. For example, an accounting software
system can use this to sync all their items from an ERP with Avalara.
            
Parameters and Classifications can be added with the Item.
            
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 owns this item. |
| `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:** `ItemCatalogueInputModel[]`

Represents an item in your company's product catalog.

| Property | Type | Required | Description |
|---|---|---|---|
| `itemId` | integer | No | The unique ID number of this item. Example: `0`. |
| `itemCode` | string | **Yes** | A unique code representing this item. Example: `Item 1`. |
| `description` | string | **Yes** | A friendly description of this item in your product catalog. Example: `Concord Grape Alpha`. |
| `taxCode` | string | No | The tax code of the item. Example: `P0000000`. |
| `itemType` | string | No | Type of item |
| `upc` | string | No | The universal product code of the 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. |
| `itemGroup` | string | No | A way to group similar items. Example: `Drinks`. |
| `category` | string | No | A path to the category where item is included. Example: `beverages - vinegar - drink`. |
| `source` | string | **Yes** | The source of creation of this item. Example: `QBO`. |
| `sourceEntityId` | string | No | The unique identifier of this item at the source Example: `QBO_1234`. |
| `properties` | object | No | Additional key-description of the product. |
| `classifications` | ClassificationModel[] | No | Classifications Attached to the Product
Please note: `taxCode` (ProductCode for SystemCode `AVATAXCODE`) is being removed from `classifications`. You can still find it in the `taxCode` field. |
| `parameters` | ItemParameterModel[] | No | Parameters Attached to the Product |
| `customParameters` | ItemCustomParametersModel[] | No | List of item custom parameters |

## Responses

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

### 200 Response: `ItemCatalogueOutputModel`

Item Catalogue output model.

| Property | Type | Required | Description |
|---|---|---|---|
| `total` | integer | No | Total number of items processed. Example: `1`. |
| `result` | ItemCatalogueResultModel[] | No | List of the items that is created, updated, deleted or failed (error) |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/itemcatalogue" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '[
  {
    "itemId": 0,
    "itemCode": "Item 1",
    "description": "Concord Grape Alpha",
    "taxCode": "P0000000",
    "itemGroup": "Drinks",
    "category": "beverages - vinegar - drink",
    "source": "QBO",
    "sourceEntityId": "QBO_1234",
    "properties": {
      "color": "white"
    },
    "classifications": [
      {
        "id": 0,
        "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"
      }
    ]
  }
]'
```