Atasu Maps

Fleet & trips

Partner fleet positions and passenger trip sharing.

← All operations

POST/v1/fleet/positionsPlanned

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

Host
https://api.atasumaps.com · publishFleetPositions
Access
API key with scope: fleet
Metering
realtime_msg (per message)
Idempotency-Key
Required: one key per command; a retry returns the first result

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.

Parameters

NameInTypeRequiredDescription
Idempotency-KeyheaderstringyesClient-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.

Request body FleetPositionBatch

NameTypeRequiredDescription
positionsFleetPosition[]yes

Responses

StatusDescriptionType
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/tripsPlanned

Start sharing a trip (vehicle ↔ passenger)

Host
https://api.atasumaps.com · createTrip
Access
API key with scope: fleet
Metering
Not metered
Idempotency-Key
Required: one key per command; a retry returns the first result

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.

Parameters

NameInTypeRequiredDescription
Idempotency-KeyheaderstringyesClient-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.

Request body TripCreate

NameTypeRequiredDescription
fleet_idstring
vehicle_idstringyes
passenger_refstringyesPartner'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

Responses

StatusDescriptionType
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}/ticketsPlanned

Issue a short-lived passenger ticket for a trip

Host
https://api.atasumaps.com · createTripTicket
Access
API key with scope: fleet
Metering
Not metered
Idempotency-Key
Required: one key per command; a retry returns the first result

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.

Parameters

NameInTypeRequiredDescription
trip_idpathstringyes
Idempotency-KeyheaderstringyesClient-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.

Request body TripTicketCreate

NameTypeRequiredDescription
passenger_refstringyesMust equal the trip's passenger
ttl_sinteger

Responses

StatusDescriptionType
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}/endPlanned

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

Host
https://api.atasumaps.com · endTrip
Access
API key with scope: fleet
Metering
Not metered
Idempotency-Key
Required: one key per command; a retry returns the first result

Parameters

NameInTypeRequiredDescription
trip_idpathstringyes
Idempotency-KeyheaderstringyesClient-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.

Responses

StatusDescriptionType
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