Skip to content
Developer documentation

Send one location or heartbeat

POST /v1/tracking/sessions/{session_id}/locations · Authorization: Bearer

Send one location or heartbeat

POST /v1/tracking/sessions/{session_id}/locations · Authorization: Bearer

POST/v1/tracking/sessions/{session_id}/locations

Send 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

NameTypeRequiredDescription
session_idstring (uuid)yesTracking session id returned by POST /v1/tracking/sessions. A device credential from one session cannot write to another.uuid

Request body

application/json · required

FieldTypeRequiredNotes
accuracy_mnumber (double) | nullnoHorizontal accuracy in metres reported by the device. Used to classify quality, never to reject an event.double
altitude_mnumber (double) | nullnodouble
battery_pctinteger | nullno0 to 100
client_event_idstring (uuid)yesIdempotency id for this event. Replaying the same id after a timeout is safe.uuid
client_seqintegeryesPer-device monotonically increasing sequence, so reordered deliveries can be repaired.>= 1
event_typeenumnolocation | heartbeat / default "location"
heading_degnumber (double) | nullnodouble
latitudenumber (double) | nullnoLatitude, decimal degrees, north positive.double
longitudenumber (double) | nullnoLongitude, decimal degrees, east positive.double
recorded_atstring (date-time)yesDevice timestamp, ISO 8601 UTC. Omit it and the server stamps arrival instead, which is less accurate after a reconnect.date-time
speed_mpsnumber (double) | nullnodouble
json
{
  "event_type": "location"
}
Minimal valid body

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

FieldTypeRequiredNotes
acceptedbooleanyes
duplicatebooleannodefault false
history_writtenbooleannodefault false
position_updatedbooleannodefault false
received_atstring (date-time) | nullnodate-time
state_updatedbooleannodefault false
state_versioninteger | nullno
json
{
  "duplicate": false,
  "history_written": false,
  "position_updated": false,
  "state_updated": false
}
Example response

Errors

StatusMeaning
401Authentication failed
403Required scope is missing
404Resource not found or is not visible to this tenant
409Conflict or idempotency error
422Validation Error
503Public 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.