# addProduct

Add a product.

`POST /tradecompliance/product`

**API:** Avalara Trade Compliance
**Tag:** Product
**API Version:** 1.0
**Base URL:** /
**Authentication:** Bearer token

Source: https://developer.avalara.com/products/trade-compliance/api/methods/Product/addProduct/

## Description

Adds a new product to the system. Optionally overwrites an existing product with the same productId.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `overwriteIfExists` | boolean | query | No | When true, overwrites an existing product with the same productId. When false, does not overwrite an existing product. |
| `avalara-version` |  | header | Yes | API version. Current version is 1.0. |

## Request Body

**Content-Type:** `application/json`
**Schema:** `ProductRequest`

Request payload used to create or update a product. 'productId', 'owner', and 'description' are required; the remaining fields are optional.

| Property | Type | Required | Description |
|---|---|---|---|
| `productId` | string | **Yes** | Customer-defined unique identifier of the product. Required. Example: `productID`. |
| `owner` | string | **Yes** | Avalara identifier of the product owner. This is typically the end-customer's AvaTax account ID under the calling profile. Required. Example: `2091280665`. |
| `description` | string | **Yes** | General description of the product. Required. Example: `description`. |
| `customsDescription` | string | No | Description used specifically for customs declarations. If omitted, defaults to the value of 'description'. Example: `customs description`. |
| `client` | string | No | Optional client identifier or label associated with the product. Used for grouping and searching products. Free-form string. Example: `client`. |
| `origin` | string | No | Country of origin in ISO 3166-1 alpha-2 format. Example: `CA`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 201 | Product successfully added. | `ProductProjection` |
| 400 | Invalid request parameters. | `AvalaraAPIExceptionDetails` |
| 401 | Authentication failed due to invalid or missing authentication token. | `AvalaraAPIExceptionDetails` |
| 403 | The customer is not authorized to access this resource. | `AvalaraAPIExceptionDetails` |
| 500 | Unexpected error on the server. | `AvalaraAPIExceptionDetails` |

### 201 Response: `ProductProjection`

A product as stored in the product service, including its identifier, descriptions, country of origin, and ownership metadata.

| Property | Type | Required | Description |
|---|---|---|---|
| `productId` | string | No | Customer-defined unique identifier of the product. Example: `productID`. |
| `description` | string | No | General description of the product. Example: `description`. |
| `customsDescription` | string | No | Description used specifically for customs declarations. If omitted on creation, defaults to the value of 'description'. Example: `customs description`. |
| `origin` | string | No | Country of origin in ISO 3166-1 alpha-2 format. Example: `CA`. |
| `client` | string | No | Optional client identifier or label associated with the product. Used for grouping and searching products. Free-form string. Example: `client`. |
| `owner` | string | No | Avalara identifier of the product owner. This is typically the end-customer's AvaTax account ID under the calling profile. Example: `2091280665`. |