Құжаттама мәтіні әзірге орыс тілінде. Қазақша аудармасы дайындалып жатыр — мәзір мен түймелер қазақша.
Submissions
Crowdsourced places, entrances and fixed cameras. Never pre-filled from OSM.
← Барлық операциялар
POST/v1/places/submissionsҚолжетімді
- Хост
https://api.atasumaps.com · createSubmission- Рұқсат
- API кілті, рұқсат аясы: contribute + кірген пайдаланушы (Atasuai)
- Есепке алу
- Тегін
- Idempotency-Key
- Міндетті: әр команда үшін бір кілт, қайталау бірінші нәтижені қайтарады
Creates a ugc.reports row in pending_review (MVP: every place-type submission is reviewed by
a moderator). Edits carry base_version — the place version the user saw. Submissions are never
pre-filled with OSM content: clients must not copy displayed basemap attributes into the form,
and moderators see a warning when content looks copied. Partner shadow users may submit
but earn no jarmaq until they link an Atasuai account.
Edits can target only crowdsourced places (ugc.*): an OpenStreetMap
object has no row in our layer to change, and copying its values would break the data-plane rule,
so target_place_id: osm.* → 422 target_not_editable until the POI decision is made. OSM objects may still be named as references (parent_place_id: osm.*,
building_ref); no OSM attribute is ever stored. The payload is exactly what the user sent
(unknown fields → 400). provenance.gps_accuracy_m is also stored as the report's accuracy;
provenance.device_id must be one of the caller's registered devices (403 otherwise).
Параметрлер
| Атауы | Қайда | Түрі | Міндетті | Сипаттама |
|---|
Idempotency-Key | header | string | иә | 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. |
Сұрау денесі SubmissionCreate
PlaceNewSubmission
| Атауы | Түрі | Міндетті | Сипаттама |
|---|
kind | "place_new" | иә | |
category | string | иә | |
names | LocalizedText | иә | Text per language. Any may be missing; clients fall back kk → ru → en. Kazakh is stored exactly as written (Ә Ғ Қ Ң Ө Ұ Ү Һ І). |
aliases | Alias[] | | |
address | Address | | Whitepaper §3 address model. A street address and a microdistrict address can coexist. All numbers are strings. |
attrs | object | | |
lnglat | LngLat | иә | WGS84 [longitude, latitude] — always this order. |
access | Access | | |
parent_place_id | PlaceId | | ugc.<uuid> for our crowdsourced places and entrances, osm.n<id> / osm.w<id> / osm.r<id> for OpenStreetMap objects. Opaque to clients; used in /p/{placeId} share links. |
building_ref | integer (int64) | | OSM building way ID — a reference only; no OSM attributes are copied |
PlaceEditSubmission
| Атауы | Түрі | Міндетті | Сипаттама |
|---|
kind | "place_edit" | иә | |
target_place_id | PlaceId | иә | ugc.<uuid> for our crowdsourced places and entrances, osm.n<id> / osm.w<id> / osm.r<id> for OpenStreetMap objects. Opaque to clients; used in /p/{placeId} share links. |
base_version | integer | иә | version of the place the user saw |
changes | object | иә | |
EntranceSubmission
| Атауы | Түрі | Міндетті | Сипаттама |
|---|
kind | "entrance" | иә | |
lnglat | LngLat | иә | WGS84 [longitude, latitude] — always this order. |
ref | string | | Entrance number as written |
flats | string | | |
entrance_type | EntranceType | иә | |
access | Access | иә | |
parent_place_id | PlaceId | | ugc.<uuid> for our crowdsourced places and entrances, osm.n<id> / osm.w<id> / osm.r<id> for OpenStreetMap objects. Opaque to clients; used in /p/{placeId} share links. |
building_ref | integer (int64) | | OSM building way ID (reference only) |
address | Address | | Whitepaper §3 address model. A street address and a microdistrict address can coexist. All numbers are strings. |
FixedCameraSubmission
| Атауы | Түрі | Міндетті | Сипаттама |
|---|
kind | "fixed_camera" | иә | |
lnglat | LngLat | иә | WGS84 [longitude, latitude] — always this order. |
heading_deg | integer | | Direction the camera enforces |
camera_type | "speed" | "red_light" | "average_speed" | "sergek" | "other" | иә | |
speed_limit_kmh | integer | | |
Жауаптар
| Мәртебе | Сипаттама | Түрі |
|---|
201 | Submission accepted for review | SubmissionCreated |
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 |
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 |
409 | Conflict — 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 |
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 |