# Create customer records

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

Guide: Exemption Certificate Management (ECM)

# Create customer records

Learn how to create customer records in ECM, including required fields and considerations for exempt customers.

**Element type:** Required

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

As you create customer records in your application, we also require a function to create a corresponding customer record in ECM.

The minimum required fields include:

-   Customer code

-   Customer name

-   Mailing address

Also include your `companyId` in the request URL.

Consider the following when creating exempt customers:

-   Include a ship-to zone if you know where your customer receives goods.

-   Verify that customers configured with a blanket exemption must have a valid certificate on file.

-   When creating customers with single-use certificates, include one or more purchase order numbers that are valid for use with this certificate.

**Example**

```
curl
  -X POST
  -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"
    }
     ]
  }
  'https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/customers'
```