# Update a customer

PATCH https://api.oletapp.com/your-store/v1/customers/{id}

`dont_email`/`dont_sms` are writable (opt-out only, same semantics as the admin PATCH).

`do_not_sell_share` is read-only; naming it in the request body is refused with `400` (the schema is strict and does not accept it). `on_account_limit` is refused the same way; on-account sales are not built yet, though a response still carries the field.

**Requires scope:** `customers:write`

Required scope: `customers:write`

## Parameters

| Name | In | Type | Required |
|---|---|---|---|
| `id` | path | string | yes |

## Request body

```
{
  address_1?: string | null
  address_2?: string | null
  city?: string | null
  company_name?: string | null
  country?: string | null
  custom_field_1?: string | null
  custom_field_2?: string | null
  custom_field_3?: string | null
  custom_field_4?: string | null
  customer_code?: string
  customer_group_id?: string
  date_of_birth?: string | null
  dont_email?: boolean
  dont_sms?: boolean
  email?: string | null
  enable_loyalty?: boolean
  first_name?: string
  gender?: string | null
  last_name?: string | null
  mobile?: string | null
  note?: string | null
  phone?: string | null
  state?: string | null
  tax_id?: string | null
  website?: string | null
  zipcode?: string | null
}
```

## Response (200)

```
{
  data: {
  address_1: string | null
  address_2: string | null
  city: string | null
  company_name: string | null
  country: string | null
  created_at: string
  custom_field_1: string | null
  custom_field_2: string | null
  custom_field_3: string | null
  custom_field_4: string | null
  customer_code: string
  customer_group_id: string
  date_of_birth: string | null
  do_not_sell_share: boolean
  dont_email: boolean
  dont_sms: boolean
  email: string | null
  enable_loyalty: boolean
  first_name: string
  gender: string | null
  id: string
  is_walk_in: boolean
  last_name: string | null
  mobile: string | null
  note: string | null
  on_account_limit: integer
  phone: string | null
  state: string | null
  tax_id: string | null
  updated_at: string
  version: string
  website: string | null
  zipcode: string | null
}
}
```

Errors follow the standard error envelope: https://getolet.com/resources/developers/errors.md

## Example

```bash
curl -X PATCH "https://api.oletapp.com/your-store/v1/customers/{id}" \
  -H "Authorization: Bearer olet_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
