Skip to main content

/api/prompter/location

Подсказка населенного пункта

/api/prompter/location

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

/api/prompter/location?query=москва

опциональный параметр - include_foreign=true/false - позволяет искать только по России или включая зарубежнгые страны (если поиск по зарубежью активирован для данной учетной записи)

опциональный параметр - country=FR - позволяет искать, например, только по Франции. Для зарубежных стран при этом подсказка будет выдаваться на латинице

 

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

успех:

{
    "success": true,
    "suggestions": [
        {
            "value": "г Магадан",
            "unrestricted_value": "Магаданская обл, г Магадан",
            "data": {
                "postal_code": "685000",
                "country": "Россия",
                "region_fias_id": "9c05e812-8679-4710-b8cb-5e8bd43cdf48",
                "region_kladr_id": "4900000000000",
                "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": "cb8ae35a-93df-4133-b377-50f3698c8b5e",
                "city_kladr_id": "4900000100000",
                "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": "cb8ae35a-93df-4133-b377-50f3698c8b5e",
                "fias_level": "4",
                "kladr_id": "4900000100000",
                "capital_marker": "2",
                "okato": "44401000000",
                "oktmo": "44701000001",
                "tax_office": "4900",
                "tax_office_legal": "4900",
                "timezone": null,
                "geo_lat": "59.5681332",
                "geo_lon": "150.8084956",
                "beltway_hit": null,
                "beltway_distance": null,
                "qc_geo": "4",
                "qc_complete": null,
                "qc_house": null,
                "unparsed_parts": null,
                "qc": null,
                "history_values": null,
                "source": "Магадан, Магаданская обл"
            }
        }
    ]
}

 

ошибка: 

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