Atasu Maps

Fleet & trips

Partner fleet positions and passenger trip sharing.

← Барлық операциялар

POST/v1/fleet/positionsЖоспарланған

Publish vehicle positions (HTTP alternative to the stream `pub` op)

Хост
https://api.atasumaps.com · publishFleetPositions
Рұқсат
API кілті, рұқсат аясы: fleet
Есепке алу
realtime_msg (message сайын)
Idempotency-Key
Міндетті: әр команда үшін бір кілт, қайталау бірінші нәтижені қайтарады

Server key only. Positions go to the organization's fleet channel and to subscribers of active trips of that vehicle; never to public channels. Snap to roads first (/v1/snap) for smooth display. Precise positions are not logged and are kept only as long as the trip needs.

Параметрлер

АтауыҚайдаТүріМіндеттіСипаттама
Idempotency-KeyheaderstringиәClient-generated unique key per logical command (UUID v4/v7 recommended). Scope: caller + endpoint + key. Same key + same body → first result (Idempotent-Replayed: true); same key + different body → 409 idempotency_key_reused. Missing → 400 idempotency_key_required. Keys are kept at least 24 hours.

Сұрау денесі FleetPositionBatch

АтауыТүріМіндеттіСипаттама
positionsFleetPosition[]иә

Жауаптар

МәртебеСипаттамаТүрі
202Accepted
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
409Conflict — never a silent overwrite. Codes: idempotency_key_reused (same key, different body), version_conflict (stale expected_version; body has current_version), invalid_state (transition not allowed from the current status), appeal_already_used, base_version_stale (place changed since the edit's baseline; rebase first), later_edits_exist (revert needs compensation), already_claimed, last_owner, already_member, deletion_pending. A retry with the original Idempotency-Key still returns the original result, never a 409.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
POST/v1/tripsЖоспарланған

Start sharing a trip (vehicle ↔ passenger)

Хост
https://api.atasumaps.com · createTrip
Рұқсат
API кілті, рұқсат аясы: fleet
Есепке алу
Тегін
Idempotency-Key
Міндетті: әр команда үшін бір кілт, қайталау бірінші нәтижені қайтарады

Server key with fleet scope. The trip belongs to the key's organization; only that organization and the trip's passenger (with a ticket) can see it.

Параметрлер

АтауыҚайдаТүріМіндеттіСипаттама
Idempotency-KeyheaderstringиәClient-generated unique key per logical command (UUID v4/v7 recommended). Scope: caller + endpoint + key. Same key + same body → first result (Idempotent-Replayed: true); same key + different body → 409 idempotency_key_reused. Missing → 400 idempotency_key_required. Keys are kept at least 24 hours.

Сұрау денесі TripCreate

АтауыТүріМіндеттіСипаттама
fleet_idstring
vehicle_idstringиә
passenger_refstringиәPartner's opaque passenger ID (no personal data)
external_refstringPartner's order ID
pickupWaypointExactly 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.
dropoffWaypointExactly 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.
expires_atstring (date-time)Hard end; default 6 hours after creation

Жауаптар

МәртебеСипаттамаТүрі
201TripTrip
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
403Authenticated but not allowed (scope_denied, key_restriction_failed, forbidden, user_banned, mfa_required, self_moderation_forbidden, feature_disabled)Problem
409Conflict — never a silent overwrite. Codes: idempotency_key_reused (same key, different body), version_conflict (stale expected_version; body has current_version), invalid_state (transition not allowed from the current status), appeal_already_used, base_version_stale (place changed since the edit's baseline; rebase first), later_edits_exist (revert needs compensation), already_claimed, last_owner, already_member, deletion_pending. A retry with the original Idempotency-Key still returns the original result, never a 409.Problem
POST/v1/trips/{trip_id}/ticketsЖоспарланған

Issue a short-lived passenger ticket for a trip

Хост
https://api.atasumaps.com · createTripTicket
Рұқсат
API кілті, рұқсат аясы: fleet
Есепке алу
Тегін
Idempotency-Key
Міндетті: әр команда үшін бір кілт, қайталау бірінші нәтижені қайтарады

The partner backend issues a ticket bound to (passenger, trip) and hands it to its app; the app presents it on the stream to subscribe to trip (WEBSOCKET.md). Tickets expire with the trip or after ttl_s, whichever comes first.

Параметрлер

АтауыҚайдаТүріМіндеттіСипаттама
trip_idpathstringиә
Idempotency-KeyheaderstringиәClient-generated unique key per logical command (UUID v4/v7 recommended). Scope: caller + endpoint + key. Same key + same body → first result (Idempotent-Replayed: true); same key + different body → 409 idempotency_key_reused. Missing → 400 idempotency_key_required. Keys are kept at least 24 hours.

Сұрау денесі TripTicketCreate

АтауыТүріМіндеттіСипаттама
passenger_refstringиәMust equal the trip's passenger
ttl_sinteger

Жауаптар

МәртебеСипаттамаТүрі
201Ticket (shown once)TripTicket
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)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
409Conflict — never a silent overwrite. Codes: idempotency_key_reused (same key, different body), version_conflict (stale expected_version; body has current_version), invalid_state (transition not allowed from the current status), appeal_already_used, base_version_stale (place changed since the edit's baseline; rebase first), later_edits_exist (revert needs compensation), already_claimed, last_owner, already_member, deletion_pending. A retry with the original Idempotency-Key still returns the original result, never a 409.Problem
POST/v1/trips/{trip_id}/endЖоспарланған

End a trip; tickets stop working and subscribers get a tombstone

Хост
https://api.atasumaps.com · endTrip
Рұқсат
API кілті, рұқсат аясы: fleet
Есепке алу
Тегін
Idempotency-Key
Міндетті: әр команда үшін бір кілт, қайталау бірінші нәтижені қайтарады

Параметрлер

АтауыҚайдаТүріМіндеттіСипаттама
trip_idpathstringиә
Idempotency-KeyheaderstringиәClient-generated unique key per logical command (UUID v4/v7 recommended). Scope: caller + endpoint + key. Same key + same body → first result (Idempotent-Replayed: true); same key + different body → 409 idempotency_key_reused. Missing → 400 idempotency_key_required. Keys are kept at least 24 hours.

Жауаптар

МәртебеСипаттамаТүрі
200Ended tripTrip
401Missing or invalid credentials (unauthenticated, key_invalid, key_revoked, token_expired, token_invalid)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
409Conflict — never a silent overwrite. Codes: idempotency_key_reused (same key, different body), version_conflict (stale expected_version; body has current_version), invalid_state (transition not allowed from the current status), appeal_already_used, base_version_stale (place changed since the edit's baseline; rebase first), later_edits_exist (revert needs compensation), already_claimed, last_owner, already_member, deletion_pending. A retry with the original Idempotency-Key still returns the original result, never a 409.Problem