# SyncItems

Sync items from a product catalog

`POST /api/v2/companies/{companyId}/items/sync`

**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/crossborder/api/methods/Items/SyncItems/

## Description

Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs
with AvaTax.
            
Any invalid or duplicate items will be ignored. To diagnose why an item is not created, use the normal create transaction API to receive validation information.
            
This API is currently limited to 500 items per call (the limit is subject to change).
            
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.
            
Please provide all the countries of destination 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:** `SyncItemsRequestModel`

Represents a request to sync items.

| Property | Type | Required | Description |
|---|---|---|---|
| `items` | ItemSyncModel[] | **Yes** | A list of items to sync with AvaTax. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 202 | Accepted | `SyncItemsResponseModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |

### 202 Response: `SyncItemsResponseModel`

The response returned after an item sync was requested.

| Property | Type | Required | Description |
|---|---|---|---|
| `status` | string | No | The status of the request Example: `Accepted`. |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/items/sync" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "items": [
    {
      "itemCode": "CHIP1041",
      "description": "Potato Chips",
      "itemGroup": "Packaged Food",
      "taxCode": "PF051578"
    }
  ]
}'
```