Create a tracking session
POST /v1/tracking/sessions · Authorization: Bearer
POST
/v1/tracking/sessionsCreate a tracking session
Creates and activates a generic tracked subject. Requires tracking:write. Retry safely with Idempotency-Key when supported by the deployment schema.
- Credential
Authorization: Bearer- Plane
https://api.bardiyamap.com- Operation id
createSession
Parameters
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | null | no | Optional stable key for safe session-create retries; max 128 characters. |
Request body
application/json · required
| Field | Type | Required | Notes |
|---|---|---|---|
external_reference | string | null | no | Customer-controlled reference like SHIPMENT-123<= 100 chars |
metadata | object | null | no | Bounded JSON metadata |
subject_type | string | no | Generic subject type<= 20 chars / default "other" |
vehicle_id | string (uuid) | null | no | Optional existing vehicle linkageuuid |
json
{
"subject_type": "other"
}Request example
shell
curl -X POST "https://api.bardiyamap.com/v1/tracking/sessions" \
-H "Authorization: Bearer $BARDIYA_TRACKING_KEY" \
-H "Content-Type: application/json" \
--data '{"subject_type":"other"}'Response 201 · PublicSessionResponse
| Field | Type | Required | Notes |
|---|---|---|---|
created_at | string (date-time) | yes | date-time |
end_reason | string | null | no | |
ended_at | string (date-time) | null | no | date-time |
external_reference | string | null | no | |
id | string (uuid) | yes | uuid |
metadata | object | null | no | |
started_at | string (date-time) | null | no | date-time |
status | string | yes | |
subject_type | string | yes | |
updated_at | string (date-time) | yes | date-time |
vehicle_id | string (uuid) | null | no | uuid |
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 is part of the Tracking group. Values on this page are generated from contract version 1.1.0.
