Create a subject subscription
POST /v1/tracking/subscriptions · Authorization: Bearer
POST
/v1/tracking/subscriptionsCreate a subject subscription
Registers an opaque consumer's interest in a tracked subject. Idempotent: an existing subscription for the same subscriber and subject returns 200 with the existing record instead of creating a second one.
- Credential
Authorization: Bearer- Plane
https://api.bardiyamap.com- Operation id
createSubscription
Parameters
This operation takes no parameters.
Request body
application/json · required
| Field | Type | Required | Notes |
|---|---|---|---|
subject | PublicSubjectRef | yes | Customer-controlled subject identity (same pair used at session create). |
subscriber_ref | string | yes | Opaque consumer identity. Echoed verbatim.<= 100 chars |
json
{
"subject": {
"type": "vehicle",
"id": "veh-1042"
},
"subscriber_ref": "dispatch-service"
}Request example
shell
curl -X POST "https://api.bardiyamap.com/v1/tracking/subscriptions" \
-H "Authorization: Bearer $BARDIYA_TRACKING_KEY" \
-H "Content-Type: application/json" \
--data '{"subject":{"type":"vehicle","id":"veh-1042"},"subscriber_ref":"dispatch-service"}'Response 200 · Subscription
| Field | Type | Required | Notes |
|---|---|---|---|
created_at | string (date-time) | yes | date-time |
id | string | yes | |
subject | PublicSubjectRef | yes | Customer-controlled subject identity (same pair used at session create). |
subscriber_ref | string | yes | |
updated_at | string (date-time) | yes | date-time |
Errors
| Status | Meaning |
|---|---|
400 | Request is malformed or a parameter is out of range |
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 |
429 | Rate limit or quota exceeded; honour `Retry-After` |
503 | Public transport is temporarily unavailable |
Error bodies use the shared envelope documented in Errors: { "error": { "code", "message", "details", "request_id" } }.
POST /v1/tracking/subscriptions is part of the Subscriptions group. Values on this page are generated from contract version 1.1.0.
