Skip to main content

/api/prompter/iplocation

Определение населенного пункта по IP адресу

/api/prompter/iplocation

(метод требует авторизации по домену)

Для запроса необходимо выполнить следующий запрос

/api/prompter/iplocation?ip=87.250.250.242

параметр ip - опциональный, если не задан, то определяется на сервере автоматически

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

успех:

{
    "success": true,
    "ip": "87.250.250.242", //ip из параметра
    "sourceIp": "87.250.250.242", //ip, определённый сервером
    "suggestions": [
        {
            "value": "г Москва",
            "unrestricted_value": "101000, г Москва",
            "data": {
                "postal_code": "101000",
                "country": "Россия",
                "countryCode": "RU",
                "region_fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "region_kladr_id": "7700000000000",
                "region_with_type": "г Москва",
                "region_type": "г",
                "region_type_full": "город",
                "region": "Москва",
                "area_fias_id": null,
                "area_kladr_id": null,
                "area_with_type": null,
                "area_type": null,
                "area_type_full": null,
                "area": null,
                "city_fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "city_kladr_id": "7700000000000",
                "city_with_type": "г Москва",
                "city_type": "г",
                "city_type_full": "город",
                "city": "Москва",
                "city_area": null,
                "city_district": null,
                "city_district_fias_id": null,
                "city_district_kladr_id": null,
                "city_district_with_type": null,
                "city_district_type": null,
                "city_district_type_full": null,
                "settlement_fias_id": null,
                "settlement_kladr_id": null,
                "settlement_with_type": null,
                "settlement_type": null,
                "settlement_type_full": null,
                "settlement": null,
                "street_fias_id": null,
                "street_kladr_id": null,
                "street_with_type": null,
                "street_type": null,
                "street_type_full": null,
                "street": null,
                "house_fias_id": null,
                "house_kladr_id": null,
                "house_type": null,
                "house_type_full": null,
                "house": null,
                "block_type": null,
                "block_type_full": null,
                "block": null,
                "flat_type": null,
                "flat_type_full": null,
                "flat": null,
                "flat_area": null,
                "square_meter_price": null,
                "flat_price": null,
                "postal_box": null,
                "fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "fias_level": "1",
                "kladr_id": "7700000000000",
                "capital_marker": "0",
                "okato": "45000000000",
                "oktmo": "45000000",
                "tax_office": "7700",
                "tax_office_legal": "7700",
                "timezone": null,
                "geo_lat": "55.7540471",
                "geo_lon": "37.620405",
                "beltway_hit": null,
                "beltway_distance": null,
                "qc_geo": "4",
                "qc_complete": null,
                "qc_house": null,
                "unparsed_parts": null,
                "qc": null,
                "history_values": null,
                "source": null
            }
        }
    ]
}

 

ошибка: 

{
"success": false,
"errors": [
 {
 "code": 0,
 "message": "Текст ошибки"
 }
]
}