Skip to main content

(POST) api/customer/info

Редактировать информацию о покупателе

api/customer/info

Производит редактирование профиля текущего покупателя. 

пример запроса:

{
  "rawPhone": "+7985858585",
  "firstName": "Oleg",
  "lastName": "Pushkin",
  "middleName": "Ivanov"
  "password": "123456",
  "rawAlternativePhone": "+85645545454",
   "address": {
      "country": "Россия",
      "countryCode": "RU",
      "region": "Московская",
      "area": null,
      "city": "Красногорск",
      "settlement": "Ангелово",
      "street": "мкр МЖК Росинка",
      "house": "74/1",
      "block": "",
      "building": "",
      "flat": "1",
      "fullAddress": "Московская обл, г Красногорск, село Ангелово, мкр МЖК Росинка, д 74/1, кв. 1",
      "fullCity": null,
      "rawData": null,
      "zip": "143442",
      "regionFias": "29251dcf-00a1-4e34-98d4-5c47484a36d4",
      "areaFias": null,
      "cityFias": "63fcf18a-365e-451f-baee-8d09ac50b773",
      "settlementFias": "2b627d06-2257-4c20-83b1-5efa10ef57b4"
      },
  "consentToNewsletter": true
}

В ответ возвращается

Успех:

В случае успеха вернется обновленный покупатель:

{
  "id": "9a5e8591-7ea7-adb6-34db-546f105fc11a",
  "emailLogin": "ivan@test.com",
  "rawPhone": "+7985858585",
  "firstName": "Oleg",
  "lastName": "Pushkin",
  "middleName": "Ivanov"
  "rawAlternativePhone": "+85645545454",
  "fullName": "Pushkin Oleg Ivanov",
  "phone": "",
  "alternativePhone": ""
  "address": {
      "country": "Россия",
      "countryCode": "RU",
      "region": "Московская",
      "area": null,
      "city": "Красногорск",
      "settlement": "Ангелово",
      "street": "мкр МЖК Росинка",
      "house": "74/1",
      "block": "",
      "building": "",
      "flat": "1",
      "fullAddress": "Московская обл, г Красногорск, село Ангелово, мкр МЖК Росинка, д 74/1, кв. 1",
      "fullCity": null,
      "rawData": null,
      "zip": "143442",
      "regionFias": "29251dcf-00a1-4e34-98d4-5c47484a36d4",
      "areaFias": null,
      "cityFias": "63fcf18a-365e-451f-baee-8d09ac50b773",
      "settlementFias": "2b627d06-2257-4c20-83b1-5efa10ef57b4"
      },
  "consentToNewsletter": true
}

ошибка: 

{
"success": false,
"errors": [
 {
 "code": 0,
 "message": "Покупатель не найден"
 }
]
}