Send one location or heartbeat
POST /v1/tracking/sessions/{session_id}/locations · Authorization: Bearer
POST
/v1/tracking/sessions/{session_id}/locationsSend one location or heartbeat
Ingests one telemetry event. client_event_id is the idempotency key for retries. Requires tracking:write.
- Credential
Authorization: Bearer- Plane
https://api.bardiyamap.com- Operation id
sendLocation
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string (uuid) | yes | Tracking session id returned by POST /v1/tracking/sessions. A device credential from one session cannot write to another.uuid |
Request body
application/json · required
| Field | Type | Required | Notes |
|---|---|---|---|
accuracy_m | number (double) | null | no | Horizontal accuracy in metres reported by the device. Used to classify quality, never to reject an event.double |
altitude_m | number (double) | null | no | double |
battery_pct | integer | null | no | 0 to 100 |
client_event_id | string (uuid) | yes | Idempotency id for this event. Replaying the same id after a timeout is safe.uuid |
client_seq | integer | yes | Per-device monotonically increasing sequence, so reordered deliveries can be repaired.>= 1 |
event_type | enum | no | location | heartbeat / default "location" |
heading_deg | number (double) | null | no | double |
latitude | number (double) | null | no | Latitude, decimal degrees, north positive.double |
longitude | number (double) | null | no | Longitude, decimal degrees, east positive.double |
recorded_at | string (date-time) | yes | Device timestamp, ISO 8601 UTC. Omit it and the server stamps arrival instead, which is less accurate after a reconnect.date-time |
speed_mps | number (double) | null | no | double |
json
{
"event_type": "location"
}Request example
shell
curl -X POST "https://api.bardiyamap.com/v1/tracking/sessions/ses_01HX9Z6Q3M/locations" \
-H "Authorization: Bearer $BARDIYA_TRACKING_KEY" \
-H "Content-Type: application/json" \
--data '{"event_type":"location"}'Response 200 · TrackingIngestResponse
| Field | Type | Required | Notes |
|---|---|---|---|
accepted | boolean | yes | |
duplicate | boolean | no | default false |
history_written | boolean | no | default false |
position_updated | boolean | no | default false |
received_at | string (date-time) | null | no | date-time |
state_updated | boolean | no | default false |
state_version | integer | null | no |
json
{
"duplicate": false,
"history_written": false,
"position_updated": false,
"state_updated": false
}Errors
| Status | Meaning |
|---|---|
401 | Authentication failed |
403 | Required scope is missing |
404 | Resource not found or is not visible to this tenant |
409 | Conflict or idempotency error |
422 | Validation Error |
503 | Public transport is temporarily unavailable |
Error bodies use the shared envelope documented in Errors: { "error": { "code", "message", "details", "request_id" } }.
POST /v1/tracking/sessions/{session_id}/locations is part of the Tracking group. Values on this page are generated from contract version 1.1.0.
