Для авторизации ключ API указывается в качестве значения параметра Api-Key заголовка запроса.
Ограничения устанавливаются для ключа: максимальное количество запросов в минуту, в день.
Для определения местоположения по вышкам сотовой связи нужно отправить POST-запрос /resolvePositionLBS.
URL: https://webmapapi.navitel.ru/api/v1/resolvePositionsLBS/
Массив данных GSM передаётся в виде JSON в теле запроса.
| Параметр | Описание | Обязательно/ Опционально | Тип данных | Формат данных |
| gsm_info | Массив данных GSM | required | array [GSMInfo] – см. Типы данных для LBS API |
| Код ответа | Параметр | Тип данных | Описание |
| 200 | positions | array [Coordinates] – см. Типы данных для LBS API | resolve positions LBS response –координаты местоположения |
| 400 | Недопустимый аргумент | ||
| 401 | Ключ API отсутствует или недействителен | ||
| 403 | Истёк срок действия ключа API, превышены пределы поиска | ||
| 404 | Объект не найден | ||
| 500 | Внутренняя ошибка сервера |
GSMInfo – информация о GSM
| Параметр | Описание | Обязательно/ Опционально | Тип данных | Формат данных |
| country_code | Mobile Country Code (mcc) – мобильный код страны | required | integer | int16 |
| operator_id | Mobile Network Code (mnc) – код мобильной сети | required | integer | int16 |
| cell_id | Cell ID (cell id) – идентификатор соты (ячейки) | required | integer | int32 |
| lac | Location Area Code (lac) – код местоположения (города) | required | integer | int16 |
Сoordinates – координаты точки
| Параметр | Описание | Обязательно/ Опционально | Тип данных | Формат данных |
| longitude | Долгота | required | number | double |
| latitude | Широта | required | number | double |
Мобильные коды стран (MCC)
Мобильные коды стран находятся в открытом доступе в сети Интернет.
См., например:
https://ru.wikipedia.org/wiki/Mobile_Country_Code
Код мобильной сети (MNC)
Коды мобильных сетей находятся в открытом доступе в сети Интернет.
См., например:
https://ru.wikipedia.org/wiki/MNC#:~:text=MNC%20(%D0%B0%D0%BD%D0%B3%D0%BB.,%D1%82%D0%B0%D0%BA%D0%B6%D0%B5%20%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D1%85%20%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%82%D0%BE%D1%80%D0%BE%D0%B2%20%D1%81%D0%BF%D1%83%D1%82%D0%BD%D0%B8%D0%BA%D0%BE%D0%B2%D0%BE%
Запрос
Тело ответа:
For authorization, the API key is specified as the value of the Api-Key parameter of the request header.
Limits are set for the key: the maximum number of requests per minute, per day..
To determine your location using cell towers, you need to send a POST request /resolvePositionLBS.
URL: https://webmapapi.navitel.ru/api/v1/resolvePositionsLBS/
The GSM data array is transmitted as JSON in the body of the request.
| Parameter | Description | Required/ Optional | Data type | Data Format |
| gsm_info | GSM data array | required | array [GSMInfo] – please refer to Data types for the LBS API |
| Response Code | Parameter | Data type | Description |
| 200 | positions | object {Coordinates} – please refer to Data types for the LBS API | resolve positions LBS response – location coordinates |
| 400 | Invalid argument | ||
| 401 | The API key is either missing or not valid | ||
| 403 | API key has expired and search limits have been exceeded | ||
| 404 | The object was not found | ||
| 500 | Internal server error |
GSMInfo — Information about GSM
| Parameter | Description | Required/ Optional | Data type | Data Format |
| country_code | Mobile Country Code (mcc) – mobile country code | required | integer | int16 |
| operator_id | Mobile Network Code (mnc) – mobile network code | required | integer | int16 |
| cell_id | Cell ID (cell id) – cell identifier | required | integer | int32 |
| lac | Location Area Code (lac) – location code (city) | required | integer | int16 |
Сoordinates – point coordinates
| Parameter | Description | Required/ Optional | Data type | Data Format |
| longitude | Longitude | required | number | double |
| latitude | Latitude | required | number | double |
Mobile Country Codes (MCC)
Mobile country codes are publicly available on the Internet.
See for example:https://en.wikipedia.org/wiki/Mobile_country_code
Mobile Network Codes (MNC)
Mobile network codes are publicly available on the Internet.
See for example:
https://en.wikipedia.org/wiki/Mobile_network_codes_in_ITU_region_3xx_(North_America)
Request
Response body