{"openapi":"3.1.0","info":{"title":"NavX API","version":"1.1.0","description":"Публичный API NavX: геокодирование, обратное геокодирование, маршруты и места.\n\nМаршруты: `?traffic=1` (opt-in) добавляет ETA по часовым профилям скоростей из треков флота — `eta_traffic_s` против `eta_static_s`.\n\nАутентификация — заголовок `X-API-Key: pk_...` (ключ выдаётся в кабинете). Без ключа доступен демо-режим: 30 запросов в минуту на IP.\n\nЛимиты: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (секунды до сброса). Ошибки: `{\"error\": {\"status\", \"code\", \"message\", \"docs\", \"request_id\"}}`.","contact":{"name":"NavX","email":"info@navx.am","url":"https://navx.am/developers/"},"license":{"name":"Terms of use","url":"https://navx.am/support/"}},"servers":[{"url":"https://navx.am","description":"production"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Ключ вида pk_... из кабинета: navx.am/portal/"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"status":{"type":"integer"},"code":{"type":"string","enum":["bad_request","conflict","forbidden","internal_error","invalid_key","method_not_allowed","not_found","payload_too_large","quota_exceeded","rate_limited","service_unavailable","unauthorized","upstream_error","upstream_timeout"]},"message":{"type":"string"},"docs":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["status","code","message"]}},"required":["error"]},"Location":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"]},"GeocodeResult":{"type":"object","properties":{"id":{"type":["string","null"],"description":"osm:<type><id> или null"},"name":{"type":["string","null"]},"display_name":{"type":["string","null"]},"type":{"type":["string","null"]},"category":{"type":["string","null"],"description":"например highway=residential"},"location":{"anyOf":[{"$ref":"#/components/schemas/Location"},{"type":"null"}]},"country":{"type":["string","null"]},"country_code":{"type":["string","null"]},"city":{"type":["string","null"]},"district":{"type":["string","null"]},"street":{"type":["string","null"]},"house_number":{"type":["string","null"]},"postcode":{"type":["string","null"]},"bbox":{"type":["array","null"],"items":{"type":"number"}},"confidence":{"type":["number","null"]},"source":{"type":"string"}}},"Place":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"name_localized":{"type":["string","null"]},"names":{"type":"object","properties":{"hy":{"type":["string","null"]},"ru":{"type":["string","null"]},"en":{"type":["string","null"]}}},"category":{"type":["string","null"]},"address":{"type":"object","properties":{"full":{"type":["string","null"]},"hy":{"type":["string","null"]},"ru":{"type":["string","null"]},"en":{"type":["string","null"]}}},"location":{"$ref":"#/components/schemas/Location"},"distance_m":{"type":["number","null"]},"contacts":{"type":"object"},"opening_hours":{"type":["string","null"]},"rating":{"type":["number","null"]},"reviews_count":{"type":["integer","null"]},"photo":{"type":["string","null"]},"logo":{"type":["string","null"]},"description":{"type":["string","null"]},"photos":{"type":["array","null"],"items":{"type":"object"}}}},"Route":{"type":"object","properties":{"distance_m":{"type":"number"},"duration_s":{"type":"number"},"distance_text":{"type":"string"},"duration_text":{"type":"string"},"geometry":{"description":"GeoJSON LineString или polyline (по параметру geometry)"},"geometry_type":{"type":"string","enum":["geojson","polyline"]},"legs":{"type":"array","items":{"type":"object"}},"waypoints":{"type":"array","items":{"type":"object"}},"eta_static_s":{"type":"number","description":"Статичный ETA OSRM. Только при traffic=1."},"eta_traffic_s":{"type":"number","description":"ETA по часовым профилям скоростей. Только при traffic=1."},"traffic_delta_s":{"type":"number","description":"eta_traffic_s - eta_static_s. Только при traffic=1."},"traffic_delta_pct":{"type":"number","description":"Изменение ETA в процентах. Только при traffic=1."},"traffic_source":{"type":"string","enum":["hourly_profile","unsupported_profile","unavailable"],"description":"Источник поправки. Только при traffic=1."},"traffic_degraded":{"type":"boolean","description":"true — профиль покрывает <10% длины маршрута, ETA оставлен статичным. Только при traffic=1."},"traffic_reason":{"type":["string","null"],"description":"Причина degraded: low_coverage|no_profile|no_annotations|unsupported_profile|db_unavailable. Только при traffic=1."},"traffic_coverage_pct":{"type":"number","description":"Доля длины маршрута с профилем, %. Только при traffic=1."},"segments_profiled":{"type":"integer","description":"Участков с профилем. Только при traffic=1."},"segments_total":{"type":"integer","description":"Всего участков маршрута. Только при traffic=1."},"traffic_hour":{"type":"integer","description":"Час профиля. Только при traffic=1."},"traffic_dow":{"type":"integer","description":"День недели профиля, пн=0. Только при traffic=1."},"traffic_sources":{"type":"object","description":"Сколько участков дал каждый источник профиля. Только при traffic=1."}}}}},"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/status":{"get":{"summary":"Состояние API","operationId":"status","security":[],"responses":{"200":{"description":"OK"}}}},"/api/v1/openapi.json":{"get":{"summary":"Эта спецификация","operationId":"openapi","security":[],"responses":{"200":{"description":"OpenAPI 3.1 JSON"}}}},"/api/v1/plans":{"get":{"summary":"Тарифы и лимиты","operationId":"plans","security":[],"responses":{"200":{"description":"Список тарифов"}}}},"/api/v1/geocode":{"get":{"summary":"Геокодирование","operationId":"geocode","description":"Адрес или название -> координаты. Ответ: `results[]` в формате JSON или исходный GeoJSON FeatureCollection при `format=geojson`.","parameters":[{"name":"q","in":"query","required":true,"description":"Адрес или название","schema":{"type":"string","example":"Աբովյան 10"}},{"name":"lang","in":"query","required":false,"description":"Язык ответа","schema":{"type":"string","enum":["hy","ru","en"],"example":"hy"}},{"name":"limit","in":"query","required":false,"description":"1..25, по умолчанию 5","schema":{"type":"integer","example":5}},{"name":"lat","in":"query","required":false,"description":"Широта для смещения ранжирования","schema":{"type":"number"}},{"name":"lon","in":"query","required":false,"description":"Долгота для смещения ранжирования","schema":{"type":"number"}},{"name":"format","in":"query","required":false,"description":"json или geojson","schema":{"type":"string","example":"json"}}],"responses":{"200":{"description":"Найдено","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"lang":{"type":"string"},"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/GeocodeResult"}}}}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Нет ключа или ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Ключ не разрешён для этого домена/IP","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Превышен rate-limit или квота тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/reverse":{"get":{"summary":"Обратное геокодирование","operationId":"reverse","description":"Координаты -> адрес. При `format=geojson` — сырой FeatureCollection.","parameters":[{"name":"lat","in":"query","required":true,"description":"Широта","schema":{"type":"number","example":40.1777}},{"name":"lon","in":"query","required":true,"description":"Долгота","schema":{"type":"number","example":44.5126}},{"name":"lang","in":"query","required":false,"description":"Язык","schema":{"type":"string","enum":["hy","ru","en"],"example":"hy"}},{"name":"format","in":"query","required":false,"description":"json или geojson","schema":{"type":"string","example":"json"}}],"responses":{"200":{"description":"Адрес","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"name":{"type":["string","null"]},"street":{"type":["string","null"]},"house_number":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"country_code":{"type":["string","null"]},"location":{"$ref":"#/components/schemas/Location"},"osm_id":{"type":["string","null"]}}}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Нет ключа или ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Ключ не разрешён для этого домена/IP","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Превышен rate-limit или квота тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"В этой точке ничего не найдено"}}}},"/api/v1/route":{"get":{"summary":"Маршрут","operationId":"route","description":"Маршрут между точками. Координаты в параметрах — `lat,lon` (в отличие от OSRM, где `lon,lat`).\n\n`traffic=1` (opt-in, по умолчанию выключен) добавляет ETA по часовым профилям скоростей из треков флота: `eta_static_s`, `eta_traffic_s`, `traffic_delta_pct`, `traffic_coverage_pct`, `segments_profiled/total`. Если профиль покрывает меньше 10% длины маршрута — `traffic_degraded: true`, `eta_traffic_s` равен статичному. Поправка считается для текущего часа (Asia/Yerevan); `traffic_hour`/`traffic_dow` задают час/день вручную.","parameters":[{"name":"from","in":"query","required":true,"description":"lat,lon начальной точки","schema":{"type":"string","example":"40.1777,44.5126"}},{"name":"to","in":"query","required":true,"description":"lat,lon конечной точки","schema":{"type":"string","example":"40.7895,43.8465"}},{"name":"via","in":"query","required":false,"description":"Промежуточные точки через ';'","schema":{"type":"string"}},{"name":"profile","in":"query","required":false,"description":"driving или foot","schema":{"type":"string","enum":["driving","foot"],"example":"driving"}},{"name":"alternatives","in":"query","required":false,"description":"Альтернативные маршруты","schema":{"type":"boolean","example":false}},{"name":"steps","in":"query","required":false,"description":"Пошаговые инструкции (маневры)","schema":{"type":"boolean","example":false}},{"name":"geometry","in":"query","required":false,"description":"geojson, polyline или none","schema":{"type":"string","example":"geojson"}},{"name":"annotations","in":"query","required":false,"description":"Дополнительные данные OSRM, напр. nodes","schema":{"type":"string"}},{"name":"traffic","in":"query","required":false,"description":"Учесть часовые профили скоростей (opt-in)","schema":{"type":"boolean","example":false}},{"name":"traffic_hour","in":"query","required":false,"description":"Час профиля 0-23 (по умолчанию текущий)","schema":{"type":"integer"}},{"name":"traffic_dow","in":"query","required":false,"description":"День недели профиля, пн=0 (по умолчанию текущий)","schema":{"type":"integer"}},{"name":"lang","in":"query","required":false,"description":"Язык текстов distance_text/duration_text","schema":{"type":"string","example":"hy"}}],"responses":{"200":{"description":"Маршрут","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Route"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Нет ключа или ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Ключ не разрешён для этого домена/IP","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Превышен rate-limit или квота тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/places":{"get":{"summary":"Поиск мест","operationId":"places","description":"Поиск по названию, категории и радиусу вокруг точки.","parameters":[{"name":"q","in":"query","required":false,"description":"Название (начало слова)","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"Код категории, см. /api/v1/categories","schema":{"type":"string"}},{"name":"lat","in":"query","required":false,"description":"Широта центра","schema":{"type":"number"}},{"name":"lon","in":"query","required":false,"description":"Долгота центра","schema":{"type":"number"}},{"name":"radius_m","in":"query","required":false,"description":"Радиус в метрах (до 200000)","schema":{"type":"number"}},{"name":"limit","in":"query","required":false,"description":"1..100, по умолчанию 20","schema":{"type":"integer","example":20}},{"name":"lang","in":"query","required":false,"description":"Язык названий","schema":{"type":"string","example":"hy"}}],"responses":{"200":{"description":"Найдено","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"lang":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Place"}}}}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Нет ключа или ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Ключ не разрешён для этого домена/IP","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Превышен rate-limit или квота тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/places/{place_id}":{"get":{"summary":"Карточка места","operationId":"place","parameters":[{"name":"place_id","in":"path","required":true,"schema":{"type":"integer"},"description":"id места"},{"name":"lang","in":"query","required":false,"description":"Язык карточки","schema":{"type":"string","example":"hy"}}],"responses":{"200":{"description":"Место","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Place"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Нет ключа или ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Ключ не разрешён для этого домена/IP","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Превышен rate-limit или квота тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено"}}}},"/api/v1/categories":{"get":{"summary":"Категории мест","operationId":"categories","parameters":[{"name":"limit","in":"query","required":false,"description":"до 500, по умолчанию 100","schema":{"type":"integer"}}],"responses":{"200":{"description":"Список категорий с количеством объектов"}}}},"/api/v1/me":{"get":{"summary":"Аккаунт и расход","operationId":"me","description":"Требует ключ или JWT. Тариф, лимиты, расход за день и месяц, ограничения ключа.","responses":{"200":{"description":"Аккаунт"},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Нет ключа или ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Ключ не разрешён для этого домена/IP","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Превышен rate-limit или квота тарифа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}