# Add_ShipTo_State

Associate a shipto state to a customer.

`PUT /v2/customers/{id}/shiptostates`

**API:** Avalara CertCapture RESTful APIs
**Tag:** Customers
**API Version:** v2
**Base URL:** https://sbx-api.certcapture.com/v2/
**Authentication:** Basic (username + license key) or API Key (`Authorization` in header)

Source: https://developer.avalara.com/products/ecm/api/certcapture/methods/Customers/Add_ShipTo_State/

## Description

Associate a state to a customer as a ship to state.  NOTE: Adding and removing Ship-to States will automatically Add and Remove Exposure Zones associated with that State that have the auto_ship_to value set to true.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `x-client-id` | integer | header | Yes | To access your companies client ID, it is available from Company Settings -> Company Details -> Company ID |
| `id` |  | path | Yes | The id of the customer. |
| `ship_to_states` | array | query | Yes | Need to pass in the state name that you want to set as shipto state for your customer. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |

## Example Request

```bash
curl -X PUT "https://sbx-api.certcapture.com/v2/v2/customers/{id}/shiptostates" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```