---
metadata:
  - name: generator
    content: Diplodoc Platform v5.61.0
alternate:
  - https://yandex.ru/dev/kit/ru/openapi/Klienty/UpdateCustomer.md
  - href: https://yandex.ru/dev/kit/ru/openapi/Klienty/UpdateCustomer.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/dev/kit/ru/llms.txt
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/kit/ru/llms.txt

<div class="openapi">

# Обновление клиента

<!-- markdownlint-disable-file -->

Обновляет информацию о клиенте.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-patch);margin-bottom: 12px">

<div class="openapi__request">

PATCH {.openapi__method}
```text translate=no
https://api.kit.yandex.net/v1/customers/{customer_id}
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "note": "Клиент часто покупает товары в нашем магазине",
  "first_name": "Иван",
  "last_name": "Иванов",
  "email": "ivan@example.com"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_email_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;email&gt;

Email клиента.

_Example:_{.json-schema-reset .json-schema-example} `ivan@example.com`
{.table-cell}
||
||

_first_name_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Имя клиента.

_Example:_{.json-schema-reset .json-schema-example} `Иван`
{.table-cell}
||
||

_last_name_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Фамилия клиента.

_Example:_{.json-schema-reset .json-schema-example} `Иванов`
{.table-cell}
||
||

_note_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Примечание к клиенту.

_Example:_{.json-schema-reset .json-schema-example} `Клиент часто покупает товары в нашем магазине`
{.table-cell}
||
|#{.json-schema-properties}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

Клиент успешно обновлен.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "customer_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "first_name": "Иван",
  "last_name": "Иванов",
  "is_registered": true,
  "phone": "+79991234567",
  "email": "user@example.com",
  "registered_at": "2020-01-01T00:00:00Z",
  "order_count": 10,
  "order_sum": "10000.00",
  "number": 10000,
  "note": "Клиент часто покупает товары в нашем магазине",
  "agreement_for_promo": true,
  "agreement_at": "2024-05-20T12:30:00Z"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_agreement_for_promo_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

Согласие клиента на получение рекламных материалов.
{.table-cell}
||
||

_customer_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [CustomerID](#entity-CustomerID)

Идентификатор клиента.

_Example:_{.json-schema-reset .json-schema-example} `019b21d9-c5d9-777d-80bd-d67c664bc6d9`
{.table-cell}
||
||

_first_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Имя клиента.

_Example:_{.json-schema-reset .json-schema-example} `Иван`
{.table-cell}
||
||

_is_registered_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

Зарегистрирован ли клиент.
{.table-cell}
||
||

_last_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Фамилия клиента.

_Example:_{.json-schema-reset .json-schema-example} `Иванов`
{.table-cell}
||
||

_note_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Примечание к клиенту.

_Example:_{.json-schema-reset .json-schema-example} `Клиент часто покупает товары в нашем магазине`
{.table-cell}
||
||

_number_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Номер клиента.
{.table-cell}
||
||

_order_count_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Количество завершенных заказов клиента.
{.table-cell}
||
||

_order_sum_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сумма завершенных заказов клиента.

_Example:_{.json-schema-reset .json-schema-example} `10000.00`
{.table-cell}
||
||

_phone_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Телефон клиента.

_Example:_{.json-schema-reset .json-schema-example} `+79991234567`
{.table-cell}
||
||

_registered_at_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата регистрации клиента.

_Example:_{.json-schema-reset .json-schema-example} `2020-01-01T00:00:00Z`
{.table-cell}
||
||

_agreement_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата и время получения последнего согласия на рекламные материалы.
Отсутствует, если клиент никогда не давал согласия. Поле не обнуляется при отзыве согласия —
актуальность согласия определяется полем `agreement_for_promo`.

_Example:_{.json-schema-reset .json-schema-example} `2024-05-20T12:30:00Z`
{.table-cell}
||
||

_email_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;email&gt;

Email клиента.

_Example:_{.json-schema-reset .json-schema-example} `user@example.com`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### CustomerID {#entity-CustomerID}

Идентификатор клиента.

**Type**: string&lt;uuid&gt;

_Example:_{.json-schema-reset .json-schema-example} `019b21d9-c5d9-777d-80bd-d67c664bc6d9`

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Некорректный запрос.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__401">

## 401 Unauthorized

Не авторизован.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__404">

## 404 Not Found

Ресурс не найден.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__500">

## 500 Internal Server Error

Внутренняя ошибка сервера.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.