تخطَّ إلى المحتوى
توثيق المطورين

Handle Ingest Location

POST /api/v1/tracking/sessions/{session_id}/locations · Authorization: Bearer (session ingest token)

Handle Ingest Location

POST /api/v1/tracking/sessions/{session_id}/locations · Authorization: Bearer (session ingest token)

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

Handle Ingest Location

Ingest one event with a session-scoped credential instead of an API key.

Credential
Authorization: Bearer (session ingest token)
Plane
https://api.bardiyamap.com
Operation id
sendLocationWithIngestCredential

Session-scoped device ingest. The credential must be minted for this exact session, so a leaked device token cannot write to another session.

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

Header parameters

NameTypeRequiredDescription
X-Tracking-Organization-Idstring | nullno

Request body

application/json · required

FieldTypeRequiredNotes
accuracy_mnumber (double) | nullnodouble
altitude_mnumber (double) | nullnodouble
battery_pctinteger | nullno0 to 100
client_event_idstring (uuid)yesuuid
client_seqintegeryes>= 1
event_typeenumnolocation | heartbeat / default "location"
heading_degnumber (double) | nullnodouble
latitudenumber (double) | nullnoLatitude in decimal degrees, north positive. Send it together with longitude.double
longitudenumber (double) | nullnoLongitude in decimal degrees, east positive. This is the second element of a GeoJSON pair, not the first.double
recorded_atstring (date-time)yesdate-time
speed_mpsnumber (double) | nullnodouble
json
{
  "event_type": "location"
}
Minimal valid body

Request example

shell
curl -X POST "https://api.bardiyamap.com/api/v1/tracking/sessions/ses_01HX9Z6Q3M/locations" \
  -H "Authorization: Bearer $BARDIYA_INGEST_TOKEN" \
  -H "X-Tracking-Organization-Id: $BARDIYA_ORG_ID" \
  -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
401Missing or invalid credential
422Validation Error

Error bodies use the shared envelope documented in Errors: { "error": { "code", "message", "details", "request_id" } }.

POST /api/v1/tracking/sessions/{session_id}/locations is part of the Tracking group. Values on this page are generated from contract version 1.1.0.