Skip to content

Добавить адрес клиента

Request

Создаёт адрес, сразу делает его активным и обновляет city, address, geolocation текущего клиента. Предыдущий активный адрес становится неактивным. Повторно добавить тот же адрес нельзя. Сначала получите fias_id и type города через GET /api/search/places, затем получите адрес и координаты через GET /api/search/addresses. В этот запрос передайте выбранные city, address и geolocation.

Security
bearerAuth or jwtCookie
Bodyapplication/jsonrequired
citystring, [ 1 .. 100 ] charactersrequired
addressstring, [ 1 .. 1000 ] charactersrequired
geolocationobject(ProfileGeolocation)required
curl -i -X POST \
  https://felmee.com/api/user/addresses \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "city": "string",
    "address": "string",
    "geolocation": {
      "lat": -90,
      "lon": -180
    }
  }'

Responses

Адрес добавлен, установлен активным и записан в профиль клиента

Bodyapplication/json
successbooleanrequired
Value:true
Example:true
messagestringrequired
Example:"User address added successfully"
codeErrorstring or nullrequired
Example:null
error_codestring or nullrequired
Example:null
dataobject(UserAddressData)required
Response
{ "success": true, "message": "User address added successfully", "codeError": null, "error_code": null, "data": { "address": {} } }