# Customer Update

## Body

| Name                                     | Type    | Description      |
| ---------------------------------------- | ------- | ---------------- |
| <mark style="color:red;">**`id`**</mark> | integer | Customer ID      |
| `name`                                   | string  | Customer Name    |
| `email`                                  | string  | Customer Email   |
| `phone`                                  | string  | Customer Phone   |
| `address`                                | string  | Customer Address |

## Response

{% tabs %}
{% tab title="200" %}

```json
{
    "data": [
        {
            "id": "2",
            "user_id": "1",
            "name": "Test Test",
            "email": "test@test.co1",
            "phone": null,
            "address": null,
            "payments_count": "1",
            "total_spend": "11.00",
            "last_payment": "2024-06-11 23:22:08",
            "created_at": "2024-06-13 20:01:54",
            "updated_at": "2024-06-11 23:22:08"
        }
    ],
    "pager": {}
}
```

{% endtab %}

{% tab title="400" %}
Validation Error

```json
{
    "status": 400,
    "error": 400,
    "messages": {
        "name": "The name field is required.",
        "email": "The email field is required.",
        "phone": "The phone field is required."
    }
}
```

{% endtab %}

{% tab title="404" %}
Customer Not Found

```json
{
    "status": 404,
    "error": 404,
    "messages": {
        "error": "AC-1 Customer not found"
    }
}
```

{% endtab %}
{% endtabs %}
