Handle Ingest Location
POST /api/v1/tracking/sessions/{session_id}/locations · Authorization: Bearer (session ingest token)
POST
/api/v1/tracking/sessions/{session_id}/locationsHandle 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
| 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 |
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
X-Tracking-Organization-Id | string | null | no |
Request body
application/json · required
| Field | Type | Required | Notes |
|---|---|---|---|
accuracy_m | number (double) | null | no | double |
altitude_m | number (double) | null | no | double |
battery_pct | integer | null | no | 0 to 100 |
client_event_id | string (uuid) | yes | uuid |
client_seq | integer | yes | >= 1 |
event_type | enum | no | location | heartbeat / default "location" |
heading_deg | number (double) | null | no | double |
latitude | number (double) | null | no | Latitude in decimal degrees, north positive. Send it together with longitude.double |
longitude | number (double) | null | no | Longitude in decimal degrees, east positive. This is the second element of a GeoJSON pair, not the first.double |
recorded_at | string (date-time) | yes | date-time |
speed_mps | number (double) | null | no | double |
json
{
"event_type": "location"
}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
| 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 | Missing or invalid credential |
422 | Validation 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.
