Atasu Maps

Reports & votes

Live road events and "still there / gone" votes.

← All operations

POST/v1/reportsAvailable

Report a road event

Host
https://api.atasumaps.com · createEventReport
Access
API key with scope: contribute + signed-in user (Atasuai)
Metering
Not metered
Idempotency-Key
Required: one key per command; a retry returns the first result

A nearby same-type, same-direction live event absorbs the report as an "up" vote (merged: true, 200); otherwise a new event is created (201). Concurrent first reports of one event create one event. Trusted users publish directly only where the event policy allows (never road_closed). Retrying with the same Idempotency-Key returns the first result even if that event has expired since; the same key with another body is 409 idempotency_key_reused (reports carry no version). details and accuracy_m are stored with the report for moderators and never published. Event types not accepted yet (ugc.event_policy.accepting: police, awaiting legal approval) return 422 event_type_disabled and store nothing; a retry of a report accepted before still replays. status and version describe the report as accepted from the caller; whether and when other users see it is decided separately (confidence, confirmations, moderation).

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 EventReportCreate

NameTypeRequiredDescription
typeEventTypeyespolice is not accepted until legal approval (422 event_type_disabled).
lnglatLngLatyesWGS84 [longitude, latitude] — always this order.
heading_degintegerDirection of travel; used for dedupe
accuracy_mnumber
observation_idstring (uuid)yesClient observation ID; used as the vote's observation when merged
device_idstring (uuid)From registerDevice
detailsobject

Responses

StatusDescriptionType
200Merged into an existing event as a confirmationEventReportResult
201New event createdEventReportResult
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
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
POST/v1/reports/{report_id}/votesAvailable

Vote "still there" / "gone" on an event

Host
https://api.atasumaps.com · voteOnReport
Access
API key with scope: contribute + signed-in user (Atasuai)
Metering
Not metered
Idempotency-Key
Required: one key per command; a retry returns the first result

Each observation is archived once per observation_id; a retry with the same Idempotency-Key is a no-op, the same key with another body is 409 idempotency_key_reused (votes carry no version). Votes never extend an event's lifetime when they are zero-weight (shadow-banned voters), replayed, flipped within 10 minutes, older than the event's half-life (max 30 min — archived only), or on one's own report; a banned user gets 403 user_banned; observed_at more than 2 minutes in the future → 400 observation_in_future; more than 1 km away → 422 too_far_from_report; an unknown report → 404. The response does not reveal whether the vote counted: an expired, hidden or own event is answered 204 like any other.

Parameters

NameInTypeRequiredDescription
report_idpathstring (uuid)yes
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 VoteCreate

NameTypeRequiredDescription
vote"up" | "down"yesup = still there 👍, down = gone 👎
lnglatLngLatyesWGS84 [longitude, latitude] — always this order.
observed_atstring (date-time)yes
observation_idstring (uuid)yes

Responses

StatusDescriptionType
204Observation recorded (or already recorded)
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
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
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