Atasu Maps

Routing

Route, ETA, matrix, map matching, pickup points.

← Все операции

POST/v1/routeДоступно

Driving / walking route with alternatives and turn-by-turn steps

Хост
https://api.atasumaps.com · route
Доступ
API-ключ с областью: route
Учёт
route (за request); traffic_route (за request)

traffic: none → route_policy: static (Valhalla). traffic: live → traffic_optimized (TomTom returns geometry, instructions and ETA together) when the key has traffic_routing, the contract is live and the budget allows; otherwise the static route with traffic.applied=false and a traffic.reason (not_entitled, budget_exhausted, provider_error, …) and the UI shows "no live traffic". A destination given as a place routes to its entrance (pedestrian) or vehicle entrance / pickup point (driving) when there is evidence; otherwise to the building or street. If Valhalla is down or does not answer within the routing timeout (5 s by default): 503 routing_unavailable with Retry-After (no straight-line or cached fallback). If too many routing requests are already running (a per-server cap; a request waits at most a few hundred ms for a slot): 503 routing_busy with Retry-After — retry after that many seconds, not at once.

Instructions: ru and en text comes from Valhalla's narrative; Valhalla has no Kazakh, so kk text is rendered by the API from its own kk translation file (same structure for every maneuver). Street names are OSM name as mapped (mostly Kazakh in Almaty and Astana) in every language. Alternatives are only computed for two waypoints (a Valhalla limit); with intermediate waypoints alternatives is ignored.

Waypoint resolution:

  • entrance_id (osm.n…): that entrance, for every costing — the caller chose it (e.g. the stairwell whose flat range matches, from GET /v1/places/{id}). An ID that is not an entrance is unresolvable.
  • place_id of an address, POI or building, pedestrian: an entrance only with unambiguous evidence — the building has exactly one pedestrian entrance, or exactly one main entrance; otherwise the address / building point. With several stairwells, pass the right one as entrance_id.
  • place_id of an address, POI or building, auto / taxi: a vehicle entrance only when routing_verified; otherwise the address / building point.
  • place_id of a street: a point on the street (street); of a city, district or microdistrict: its representative point (locality).
  • Crowdsourced ugc.* IDs (published places only; reverted ones are unresolvable): the same rules over the place's approved entrances; the place's own point otherwise (building). No crowdsourced entrance is routing_verified yet, so they never steer auto / taxi unless named as entrance_id.

Тело запроса RouteRequest

ИмяТипОбязательноОписание
waypointsWaypoint[]даOrigin, optional intermediate points, destination. Max 25.
costingCostingдаMVP — driving (auto, taxi) and walking.
alternativesinteger
trafficTrafficMode
langLang
geometry_format"polyline6" | "geojson"

Ответы

СтатусОписаниеТип
200RoutesRouteResponse
400Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future)Problem
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)Problem
402A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product)Problem
403Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled)Problem
422Understood but cannot be done (outside_coverage, no_route, unresolvable_waypoint, too_far_from_report, event_type_disabled, no_evidence, target_not_editable)Problem
429Rate limit (rate_limited) or monthly plan quota (quota_exceeded: reject plans only; Retry-After = seconds until the next Asia/Almaty month; context = product, included, used, period_end)Problem
503Routing engine (Valhalla) cannot take the request. Both codes carry Retry-After; wait that long before retrying, never retry at once. - routing_busy: temporary overload — too many routing requests are running on this server; the request waited a short moment (≈ 300 ms) for a slot, or the waiting line was full, and was not computed or metered. Retry after Retry-After (1 s). - routing_unavailable: the engine is down, failing or did not answer within the routing timeout. Retry after Retry-After (10 s); show "routing unavailable", there is no fallback route.Problem
POST/v1/etaЗапланировано

Fixed-route live travel time (for quotes)

Хост
https://api.atasumaps.com · eta
Доступ
API-ключ с областью: route
Учёт
route (за request); traffic_route (за request)

route_policy is always fixed_path: the Valhalla route is rebuilt through TomTom as a path and only its live duration is taken — never a different, faster route, so it must not be called "traffic-avoiding". Route identity is checked (15 m two-way buffer coverage ≥ 95%), otherwise traffic.reason=route_mismatch. Departure must be now (± 5 min); a future time returns 400 future_departure_not_supported. traffic.fetched_at is when we fetched, not the vendor's observation time. Request-specific fields (requested, reason, degraded) are recomputed per request; only successful live durations are shared in cache.

Тело запроса EtaRequest

ИмяТипОбязательноОписание
fromWaypointдаExactly one of lnglat, place_id, entrance_id. A place_id destination resolves to an evidence-backed entrance / pickup point for the costing, else the building or street.
toWaypointдаExactly one of lnglat, place_id, entrance_id. A place_id destination resolves to an evidence-backed entrance / pickup point for the costing, else the building or street.
viaWaypoint[]
costingCostingдаMVP — driving (auto, taxi) and walking.
trafficTrafficMode
depart_atstring (date-time)Must be now ± 5 min; omit for now

Ответы

СтатусОписаниеТип
200EstimateEtaResponse
400Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future)Problem
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)Problem
402A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product)Problem
403Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled)Problem
422Understood but cannot be done (outside_coverage, no_route, unresolvable_waypoint, too_far_from_report, event_type_disabled, no_evidence, target_not_editable)Problem
429Rate limit (rate_limited) or monthly plan quota (quota_exceeded: reject plans only; Retry-After = seconds until the next Asia/Almaty month; context = product, included, used, period_end)Problem
503Routing engine (Valhalla) cannot take the request. Both codes carry Retry-After; wait that long before retrying, never retry at once. - routing_busy: temporary overload — too many routing requests are running on this server; the request waited a short moment (≈ 300 ms) for a slot, or the waiting line was full, and was not computed or metered. Retry after Retry-After (1 s). - routing_unavailable: the engine is down, failing or did not answer within the routing timeout. Retry after Retry-After (10 s); show "routing unavailable", there is no fallback route.Problem
POST/v1/matrixЗапланировано

Sources × targets travel-time matrix (dispatch)

Хост
https://api.atasumaps.com · matrix
Доступ
API-ключ с областью: matrix
Учёт
matrix_element (за element)

Static (Valhalla) only in the MVP. Metered by element count (sources × targets). Max 100 sources, 100 targets and 2,500 elements per request; larger requests return 400 limit_exceeded. The element budget is reserved before computing; when exhausted: 402 budget_exhausted.

Тело запроса MatrixRequest

ИмяТипОбязательноОписание
sourcesLngLat[]да
targetsLngLat[]да
costingCostingдаMVP — driving (auto, taxi) and walking.

Ответы

СтатусОписаниеТип
200MatrixMatrixResponse
400Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future)Problem
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)Problem
402A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product)Problem
403Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled)Problem
429Rate limit (rate_limited) or monthly plan quota (quota_exceeded: reject plans only; Retry-After = seconds until the next Asia/Almaty month; context = product, included, used, period_end)Problem
503Routing engine (Valhalla) cannot take the request. Both codes carry Retry-After; wait that long before retrying, never retry at once. - routing_busy: temporary overload — too many routing requests are running on this server; the request waited a short moment (≈ 300 ms) for a slot, or the waiting line was full, and was not computed or metered. Retry after Retry-After (1 s). - routing_unavailable: the engine is down, failing or did not answer within the routing timeout. Retry after Retry-After (10 s); show "routing unavailable", there is no fallback route.Problem
POST/v1/snapЗапланировано

Map-match a GPS trace to roads

Хост
https://api.atasumaps.com · snap
Доступ
API-ключ с областью: snap
Учёт
snap (за point)

Valhalla map matching. Metered per input point; max 2,000 points. Traces are processed in memory and never logged.

Тело запроса SnapRequest

ИмяТипОбязательноОписание
pointsTracePoint[]да
costingCostingдаMVP — driving (auto, taxi) and walking.

Ответы

СтатусОписаниеТип
200Matched traceSnapResponse
400Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future)Problem
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)Problem
402A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product)Problem
403Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled)Problem
422Understood but cannot be done (outside_coverage, no_route, unresolvable_waypoint, too_far_from_report, event_type_disabled, no_evidence, target_not_editable)Problem
429Rate limit (rate_limited) or monthly plan quota (quota_exceeded: reject plans only; Retry-After = seconds until the next Asia/Almaty month; context = product, included, used, period_end)Problem
503Routing engine (Valhalla) cannot take the request. Both codes carry Retry-After; wait that long before retrying, never retry at once. - routing_busy: temporary overload — too many routing requests are running on this server; the request waited a short moment (≈ 300 ms) for a slot, or the waiting line was full, and was not computed or metered. Retry after Retry-After (1 s). - routing_unavailable: the engine is down, failing or did not answer within the routing timeout. Retry after Retry-After (10 s); show "routing unavailable", there is no fallback route.Problem
POST/v1/pickup-pointsЗапланировано

Recommended pickup points — stairwell entrances, compound gates, legal stops

Хост
https://api.atasumaps.com · pickupPoints
Доступ
API-ключ с областью: pickup
Учёт
pickup (за request)

Only points backed by field data, approved submissions or licensed data; none are generated.

Тело запроса PickupPointsRequest

ИмяТипОбязательноОписание
nearWaypointдаExactly one of lnglat, place_id, entrance_id. A place_id destination resolves to an evidence-backed entrance / pickup point for the costing, else the building or street.
radius_minteger
costingCostingMVP — driving (auto, taxi) and walking.
limitinteger

Ответы

СтатусОписаниеТип
200Pickup points, best firstPickupPointsResponse
400Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future)Problem
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)Problem
402A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product)Problem
403Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled)Problem
404No such resource, or not visible to the caller (not_found)Problem
429Rate limit (rate_limited) or monthly plan quota (quota_exceeded: reject plans only; Retry-After = seconds until the next Asia/Almaty month; context = product, included, used, period_end)Problem