# ImportItemCodesController_ImportItemCodes_Post

Imports item codes.

`POST /api/v1/ImportItemCodes/ImportItemCodes`

**API:** Excise Platform API
**Tag:** ImportItemCodesController
**API Version:** v1
**Base URL:** https://excise.avalara.com
**Content-Type:** `application/json`
**Accepts:** `application/json`
**Authentication:** Basic (username + license key)

Source: https://developer.avalara.com/products/excise/api/methods/ImportItemCodesController/ImportItemCodesController_ImportItemCodes_Post/

## Description

Imports item code records into the Excise Platform. The import engine processes the provided
item codes and returns a summary of the results including inserted, updated, and failed records.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `x-company-id` | integer | header | Yes | Company ID that owns the data. |
| `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. |

## Request Body

**Schema:** `Avalara.Excise.Common.Contracts.Services.ItemCodeImportRequest`

Represents a request object for importing item codes through the REST service.
This class contains all the necessary information to perform an item code import operation,
including the item codes to import, import configuration options, and matching behavior settings.

| Property | Type | Required | Description |
|---|---|---|---|
| `ItemCodes` | Avalara.Excise.Common.Contracts.Services.RestItemCode[] | No | Gets or sets an array of item codes to be imported.
Each item code contains the data that will be processed and imported into the system
for tax classification and product identification purposes. |
| `ImportName` | string | No | Gets or sets the name identifier for this import operation.
This name is used to identify and track the import operation in logs and reports. Example: `string`. |
| `UpdateMatchesMode` | string | No | Gets or sets the update matching mode that determines how existing records are handled during import.
This setting controls whether and how the system should match and update existing item codes
when duplicates are found during the import process. Values: `NONE`, `INSERT`, `UPDATE`, `COPY`. Example: `NONE`. |
| `LoadId` | string | No | Gets or sets the unique identifier for this import load operation.
This GUID is used to correlate related import operations and track the overall import process. Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Returns a summary of the item code import results. | `Avalara.Excise.Common.Contracts.Services.RestItemCodeImportResultSummary` |

### 200 Response: `Avalara.Excise.Common.Contracts.Services.RestItemCodeImportResultSummary`

Summarizes the results of an item code import operation, including counts and per-record results.

| Property | Type | Required | Description |
|---|---|---|---|
| `ItemCodeResults` | Avalara.Excise.Common.Contracts.Services.RestItemCodeResult[] | No | Per-record import results for each item code. |
| `Status` | string | No | The overall processing status of the import operation. Example: `Inserted`. |
| `NumberProcessed` | integer | No | The total number of records processed during the import. Example: `10`. |
| `NumberInserted` | integer | No | The total number of records inserted during the import. Example: `8`. |
| `NumberUpdated` | integer | No | The total number of records updated during the import. Example: `1`. |
| `NumberFailed` | integer | No | The total number of records that failed during the import. Example: `1`. |

## Example Request

```bash
curl -X POST "https://excise.avalara.com/api/v1/ImportItemCodes/ImportItemCodes" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "ItemCodes": [
    {
      "ItemCode": "IC-001",
      "EffectiveDate": "2024-01-01T00:00:00",
      "ObsoleteDate": "2028-12-31T23:59:59",
      "LockedDate": "2024-03-15T00:00:00",
      "Description": "Premium Unleaded Gasoline",
      "ItemCodeMappingId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  ],
  "ImportName": "string",
  "UpdateMatchesMode": "NONE",
  "LoadId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'
```