# CreateItemCustomParameters

Add custom parameters to an item.

`POST /api/v2/companies/{companyId}/items/{itemId}/custom-parameters`

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

## Description

Add custom parameters to an item.
            
Custom parameters provide extra information about an item that can be used for various business purposes.
These parameters are stored as key-value pairs where the parameter name is the key and the value is the corresponding data.
            
Custom parameters can be used to store custom attributes, metadata, or any other supplementary information
that doesn't fit into the standard item fields.

### 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 custom parameter. |
| `itemId` | integer | path | Yes | The item id. |
| `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:** `ItemCustomParametersModel[]`

Class to accommodate Custom defined parameters

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | The unique ID number of this item custom parameter Example: `0`. |
| `name` | string | **Yes** | A unique code representing this item custom parameter. Example: `Material Used`. |
| `value` | string | **Yes** | The value of the custom parameter for this item.
When creating or updating an item, you can specify custom parameter values
to store additional metadata or business-specific information. Example: `Nylon`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 201 | Created |  |
| 400 | Bad Request | `ProblemDetails` |
| 401 | Unauthorized | `ProblemDetails` |
| 404 | Not Found | `ProblemDetails` |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/items/{itemId}/custom-parameters" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '[
  {
    "id": 0,
    "name": "Material Used",
    "value": "Nylon"
  }
]'
```