# UpdateCompanyParameterDetail

Update a company parameter

`PUT /api/v2/companies/{companyId}/parameters/{id}`

**API:** AvaTax API
**Tag:** Companies
**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/Companies/UpdateCompanyParameterDetail/

## Description

Update a parameter of a company.
            
Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
            
A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
            
A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.

### Security Policies

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

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The company id. |
| `id` | integer | path | Yes | The company parameter 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:** `CompanyParameterDetailModel`

Represents a parameter associated with a company.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | Identifier for company parameter Example: `0`. |
| `companyId` | integer | No | CompanyId associated with the parameter Example: `0`. |
| `name` | string | **Yes** | The parameter's name Example: `IsPrimaryAddress`. |
| `value` | string | **Yes** | The value of the parameter Example: `true`. |
| `unit` | string | No | The unit of measurement code for the parameter |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `CompanyParameterDetailModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `CompanyParameterDetailModel`

Represents a parameter associated with a company.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | Identifier for company parameter Example: `0`. |
| `companyId` | integer | No | CompanyId associated with the parameter Example: `0`. |
| `name` | string | **Yes** | The parameter's name Example: `IsPrimaryAddress`. |
| `value` | string | **Yes** | The value of the parameter Example: `true`. |
| `unit` | string | No | The unit of measurement code for the parameter |

## Example Request

```bash
curl -X PUT "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/parameters/{id}" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "id": 0,
  "companyId": 0,
  "name": "IsPrimaryAddress",
  "value": "true"
}'
```