# AlternateProductsController_Create

Creates an alternate product record.

`POST /api/v1/AlternateProducts/Create`

**API:** Excise Platform API
**Tag:** AlternateProductsController
**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/AlternateProductsController/AlternateProductsController_Create/

## Description

Creates a new alternate product code record. The alternate product is validated and sanitized
before insertion.

## 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.RestAlternateProduct`

Represents an alternate product mapping for REST services, containing product codes, jurisdictions, and tax information.

| Property | Type | Required | Description |
|---|---|---|---|
| `CountryCode` | string | No | The ISO 3166-1 alpha-3 country code. Example: `USA`. |
| `Jurisdiction` | string | No | The jurisdiction or state code. Example: `AL`. |
| `ProductCode` | string | No | The product code identifier. Example: `065`. |
| `AlternateProductCode` | string | No | The alternate product code mapped to the primary product for this jurisdiction. Example: `065A`. |
| `EffectiveDate` | string | No | The date when the record becomes effective. Example: `2024-01-01T00:00:00`. |
| `ObsoleteDate` | string | No | The date when the record becomes obsolete. Example: `2028-12-31T23:59:59`. |
| `TerminalCode` | string | No | The terminal code associated with this mapping. Example: `T01ME1000`. |
| `AlternativeFuelContent` | number | No | The alternative fuel content for the product, when applicable. Example: `0.15`. |
| `TaxCode` | string | No | The tax code associated with this record. Example: `EX01`. |
| `Name` | string | No | The display name. Example: `Motor Gasoline Alternate`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Returns the created alternate product. | `Avalara.Excise.Common.Contracts.Services.RestAlternateProduct` |
| 400 | Returns an error if the request is invalid. |  |

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

Represents an alternate product mapping for REST services, containing product codes, jurisdictions, and tax information.

| Property | Type | Required | Description |
|---|---|---|---|
| `CountryCode` | string | No | The ISO 3166-1 alpha-3 country code. Example: `USA`. |
| `Jurisdiction` | string | No | The jurisdiction or state code. Example: `AL`. |
| `ProductCode` | string | No | The product code identifier. Example: `065`. |
| `AlternateProductCode` | string | No | The alternate product code mapped to the primary product for this jurisdiction. Example: `065A`. |
| `EffectiveDate` | string | No | The date when the record becomes effective. Example: `2024-01-01T00:00:00`. |
| `ObsoleteDate` | string | No | The date when the record becomes obsolete. Example: `2028-12-31T23:59:59`. |
| `TerminalCode` | string | No | The terminal code associated with this mapping. Example: `T01ME1000`. |
| `AlternativeFuelContent` | number | No | The alternative fuel content for the product, when applicable. Example: `0.15`. |
| `TaxCode` | string | No | The tax code associated with this record. Example: `EX01`. |
| `Name` | string | No | The display name. Example: `Motor Gasoline Alternate`. |

## Example Request

```bash
curl -X POST "https://excise.avalara.com/api/v1/AlternateProducts/Create" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "CountryCode": "USA",
  "Jurisdiction": "AL",
  "ProductCode": "065",
  "AlternateProductCode": "065A",
  "EffectiveDate": "2024-01-01T00:00:00",
  "ObsoleteDate": "2028-12-31T23:59:59",
  "TerminalCode": "T01ME1000",
  "AlternativeFuelContent": 0.15,
  "TaxCode": "EX01",
  "Name": "Motor Gasoline Alternate"
}'
```