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

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

Request

PATCH

https://api.kit.yandex.net/v1/customers/{customer_id}

Body

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

Name

Description

email

Type: string<email>

Email клиента.

Example: ivan@example.com

first_name

Type: string

Имя клиента.

Example: Иван

last_name

Type: string

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

Example: Иванов

note

Type: string

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

Example: Клиент часто покупает товары в нашем магазине

Responses

200 OK

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

Body

application/json
{
  "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": "Клиент часто покупает товары в нашем магазине"
}

Name

Description

customer_id

Type: CustomerID

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

Example: 019b21d9-c5d9-777d-80bd-d67c664bc6d9

email

Type: string<email>

Email клиента.

Example: user@example.com

first_name

Type: string

Имя клиента.

Example: Иван

is_registered

Type: boolean

Зарегистрирован ли клиент.

last_name

Type: string

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

Example: Иванов

note

Type: string

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

Example: Клиент часто покупает товары в нашем магазине

number

Type: integer

Номер клиента.

order_count

Type: integer

Количество завершенных заказов клиента.

order_sum

Type: string

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

Example: 10000.00

phone

Type: string

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

Example: +79991234567

registered_at

Type: string<date-time>

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

Example: 2020-01-01T00:00:00Z

CustomerID

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

Type: string<uuid>

Example: 019b21d9-c5d9-777d-80bd-d67c664bc6d9

400 Bad Request

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

Body

application/json
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}

Name

Description

code

Type: string

Example: VALIDATION_ERROR

message

Type: string

Example: Invalid input

trace_id

Type: string

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

Example: 00000000000000000000000000000000

401 Unauthorized

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

Body

application/json
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}

Name

Description

code

Type: string

Example: VALIDATION_ERROR

message

Type: string

Example: Invalid input

trace_id

Type: string

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

Example: 00000000000000000000000000000000

404 Not Found

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

Body

application/json
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}

Name

Description

code

Type: string

Example: VALIDATION_ERROR

message

Type: string

Example: Invalid input

trace_id

Type: string

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

Example: 00000000000000000000000000000000

500 Internal Server Error

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

Body

application/json
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}

Name

Description

code

Type: string

Example: VALIDATION_ERROR

message

Type: string

Example: Invalid input

trace_id

Type: string

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

Example: 00000000000000000000000000000000