# CreateLocationParameters

Add parameters to a location.

`POST /api/v2/companies/{companyId}/locations/{locationId}/parameters`

**API:** AvaTax API
**Tag:** Locations
**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/Locations/CreateLocationParameters/

## Description

Add parameters to a location.
            
Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
            
A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
            
A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
            
To see available parameters for this location, call `/api/v2/definitions/parameters?$filter=attributeType eq Company`
            
Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The ID of the company that owns this location parameter. |
| `locationId` | integer | path | Yes | The location 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:** `LocationParameterModel[]`

The parameter associated with a company location.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | The ID number of the parameter. Example: `0`. |
| `name` | string | **Yes** | The parameter's name. Example: `NumberOfUnitsForRent`. |
| `unit` | string | No | The parameter's value. Example: `Count`. |
| `value` | string | **Yes** | The value of the parameter. Example: `10`. |
| `locationId` | integer | No | The ID of the company location the parameter associated with. Example: `12345`. |

## Responses

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

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/locations/{locationId}/parameters" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '[
  {
    "id": 0,
    "name": "NumberOfUnitsForRent",
    "unit": "Count",
    "value": "10",
    "locationId": 12345
  }
]'
```