# UpdateCustomFields

Update custom fields

`PUT /api/v2/companies/{companyId}/customers/{customerCode}/custom-fields`

**API:** AvaTax API
**Tag:** Customers
**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/Customers/UpdateCustomFields/

## Description

Update the value of the custom field.
            
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`.  To request setup of exemption
certificate storage for this company, call `RequestCertificateSetup`.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
* This API depends on the following active services:*Required* (all):  AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The unique ID number of the company that recorded this customer |
| `customerCode` | string | path | Yes | The unique code representing this customer |
| `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:** `UpdateCustomFieldsModel`

UpdateCustomFieldsModel with list of UpdateCustomFields

| Property | Type | Required | Description |
|---|---|---|---|
| `customFields` | UpdateCustomFields[] | No | List of UpdateCustomFields |

## Responses

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

## Example Request

```bash
curl -X PUT "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/customers/{customerCode}/custom-fields" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "customFields": [
    {
      "id": 0,
      "value": "test"
    }
  ]
}'
```