# Update a customer record

Source: https://developer.avalara.com/products/ecm/integration-guides/document-management/nld9484660301080/

Guide: Exemption Certificate Management (ECM)

# Update a customer record

Learn how to update a customer record in ECM using the UpdateCustomer API.

**Element type:** Required

**Endpoints/Models used:** [UpdateCustomer](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Customers/UpdateCustomer/)

As you update customer records in your application, we require that you also include a function to update the corresponding customer record in ECM. Use the [UpdateCustomer API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Customers/UpdateCustomer/) to make any necessary edits to a customer. Include your `companyId` and the `customerCode` in the request URL.

**Example**

```
curl
  -X PUT
  -H 'Accept: application/json'
  -H 'Authorization: Basic ${btoa(`:`)}'
  -H 'Content-Type: application/json'
  --data {
    "companyId": 0,
    "customerCode": "fea37e14-d9ad-4336-b32d-247d412ebf98",
    "alternateId": "987654321",
    "name": "Dr. Bob Example",
    "attnName": "Attn: Receiving",
    "line1": "645 Main Street",
    "city": "Irvine",
    "postalCode": "92614",
    "phoneNumber": "(949) 555-1212",
    "faxNumber": "949.555.1213",
    "emailAddress": "dr.bob.example@example.org",
    "contactName": "Alice Smith",
    "lastTransaction": "2024-10-08T00:00:00",
    "country": "US",
    "region": "CA",
    "exposureZones": [
      {
        "name": "Washington"
      },
      {
        "name": "Oregon"
      }
    ]
  }
  'https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/customers/{customerCode}'
```