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

Create a subject subscription

POST /v1/tracking/subscriptions · Authorization: Bearer

Create a subject subscription

POST /v1/tracking/subscriptions · Authorization: Bearer

POST/v1/tracking/subscriptions

Create 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

FieldTypeRequiredNotes
subjectPublicSubjectRefyesCustomer-controlled subject identity (same pair used at session create).
subscriber_refstringyesOpaque consumer identity. Echoed verbatim.<= 100 chars
json
{
  "subject": {
    "type": "vehicle",
    "id": "veh-1042"
  },
  "subscriber_ref": "dispatch-service"
}
Minimal valid body

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

FieldTypeRequiredNotes
created_atstring (date-time)yesdate-time
idstringyes
subjectPublicSubjectRefyesCustomer-controlled subject identity (same pair used at session create).
subscriber_refstringyes
updated_atstring (date-time)yesdate-time

Errors

StatusMeaning
400Request is malformed or a parameter is out of range
401Authentication failed
403Required scope is missing
404Resource not found or is not visible to this tenant
409Conflict or idempotency error
422Validation Error
429Rate limit or quota exceeded; honour `Retry-After`
503Public 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.