Құжаттама мәтіні әзірге орыс тілінде. Қазақша аудармасы дайындалып жатыр — мәзір мен түймелер қазақша.
Routing
Route, ETA, matrix, map matching, pickup points.
← Барлық операциялар
POST/v1/routeҚолжетімді
- Хост
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
| Атауы | Түрі | Міндетті | Сипаттама |
|---|
waypoints | Waypoint[] | иә | Origin, optional intermediate points, destination. Max 25. |
costing | Costing | иә | MVP — driving (auto, taxi) and walking. |
alternatives | integer | | |
traffic | TrafficMode | | |
lang | Lang | | |
geometry_format | "polyline6" | "geojson" | | |
Жауаптар
| Мәртебе | Сипаттама | Түрі |
|---|
200 | Routes | RouteResponse |
400 | Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future) | Problem |
401 | Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid) | Problem |
402 | A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product) | Problem |
403 | Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled) | Problem |
422 | Understood but cannot be done (outside_coverage, no_route, unresolvable_waypoint, too_far_from_report, event_type_disabled, no_evidence, target_not_editable) | Problem |
429 | Rate 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 |
503 | Routing 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Жоспарланған
- Хост
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
| Атауы | Түрі | Міндетті | Сипаттама |
|---|
from | Waypoint | иә | 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. |
to | Waypoint | иә | 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. |
via | Waypoint[] | | |
costing | Costing | иә | MVP — driving (auto, taxi) and walking. |
traffic | TrafficMode | | |
depart_at | string (date-time) | | Must be now ± 5 min; omit for now |
Жауаптар
| Мәртебе | Сипаттама | Түрі |
|---|
200 | Estimate | EtaResponse |
400 | Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future) | Problem |
401 | Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid) | Problem |
402 | A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product) | Problem |
403 | Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled) | Problem |
422 | Understood but cannot be done (outside_coverage, no_route, unresolvable_waypoint, too_far_from_report, event_type_disabled, no_evidence, target_not_editable) | Problem |
429 | Rate 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 |
503 | Routing 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Жоспарланған
- Хост
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
| Атауы | Түрі | Міндетті | Сипаттама |
|---|
sources | LngLat[] | иә | |
targets | LngLat[] | иә | |
costing | Costing | иә | MVP — driving (auto, taxi) and walking. |
Жауаптар
| Мәртебе | Сипаттама | Түрі |
|---|
200 | Matrix | MatrixResponse |
400 | Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future) | Problem |
401 | Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid) | Problem |
402 | A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product) | Problem |
403 | Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled) | Problem |
429 | Rate 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 |
503 | Routing 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Жоспарланған
- Хост
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
| Атауы | Түрі | Міндетті | Сипаттама |
|---|
points | TracePoint[] | иә | |
costing | Costing | иә | MVP — driving (auto, taxi) and walking. |
Жауаптар
| Мәртебе | Сипаттама | Түрі |
|---|
200 | Matched trace | SnapResponse |
400 | Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future) | Problem |
401 | Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid) | Problem |
402 | A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product) | Problem |
403 | Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled) | Problem |
422 | Understood but cannot be done (outside_coverage, no_route, unresolvable_waypoint, too_far_from_report, event_type_disabled, no_evidence, target_not_editable) | Problem |
429 | Rate 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 |
503 | Routing 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Жоспарланған
- Хост
https://api.atasumaps.com · pickupPoints- Рұқсат
- API кілті, рұқсат аясы: pickup
- Есепке алу
- pickup (request сайын)
Only points backed by field data, approved submissions or licensed data; none are generated.
Сұрау денесі PickupPointsRequest
| Атауы | Түрі | Міндетті | Сипаттама |
|---|
near | Waypoint | иә | 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_m | integer | | |
costing | Costing | | MVP — driving (auto, taxi) and walking. |
limit | integer | | |
Жауаптар
| Мәртебе | Сипаттама | Түрі |
|---|
200 | Pickup points, best first | PickupPointsResponse |
400 | Invalid request (invalid_request, idempotency_key_required, limit_exceeded, future_departure_not_supported, observation_in_future) | Problem |
401 | Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid) | Problem |
402 | A budget cap is reached and no degraded answer exists (budget_exhausted; context.level is organization or product, context.product the product) | Problem |
403 | Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled) | Problem |
404 | No such resource, or not visible to the caller (not_found) | Problem |
429 | Rate 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 |