> ## Documentation Index
> Fetch the complete documentation index at: https://developers.mageloyalty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a customer

> Update editable fields on a customer.

Update editable fields on a customer. The `identifier` can be a Shopify customer ID or email.

Supports both JSON:API and flat request body formats.

## Request body

| Field              | Type           | Description                                               |
| ------------------ | -------------- | --------------------------------------------------------- |
| `date_of_birth`    | string \| null | ISO 8601 date. Pass `null` to clear.                      |
| `is_excluded`      | boolean        | Whether the customer is excluded from the loyalty program |
| `anniversary_date` | string \| null | ISO 8601 date. Pass `null` to clear.                      |

**JSON:API format:**

```json theme={null}
{
  "data": {
    "attributes": {
      "date_of_birth": "1990-05-15T00:00:00.000Z",
      "is_excluded": false,
      "anniversary_date": "2023-03-10T09:00:00.000Z"
    }
  }
}
```

**Flat format:**

```json theme={null}
{
  "date_of_birth": "1990-05-15T00:00:00.000Z",
  "is_excluded": false,
  "anniversary_date": "2023-03-10T09:00:00.000Z"
}
```

## Response

Returns the updated [customer object](/api-reference/customers/object).

## Errors

| Status | Scenario             |
| ------ | -------------------- |
| `400`  | Invalid request body |
| `404`  | Customer not found   |
