SmartGare
API referenceEndpoints

Read the departures a coach is committed to

Returns the coach's live commitments in the order it runs them, each with the bay its departure leaves from where one is assigned, and the moment the answer was current as of. Read from the coach's own commitments, never from what the cameras saw. A coach committed to nothing answers with no departures rather than failing. **Required permission:** `traffic.assignment:read`

GET/traffic/v1/vehicles/{vehicleId}/assignments

Returns the coach's live commitments in the order it runs them, each with the bay its departure leaves from where one is assigned, and the moment the answer was current as of. Read from the coach's own commitments, never from what the cameras saw. A coach committed to nothing answers with no departures rather than failing.

Required permission: traffic.assignment:read

AuthorizationBearer <token>

In: header

Response Body

*/*

curl -X GET "https://example.com/traffic/v1/vehicles/{vehicleId}/assignments"
{  "current_as_of": "2019-08-24T14:15:22Z",  "departures": [    {      "bay_assignment": {        "assigned_at": "2019-08-24T14:15:22Z",        "assigned_by": "string",        "bay_id": "string",        "eligibility_status": "PENDING_VEHICLE",        "family_override_reason": "string",        "id": "string",        "length_unknown_reason": "string",        "open_conflict_ids": [          "string"        ],        "originated_from": "OPERATOR",        "planned_from": "2019-08-24T14:15:22Z",        "planned_until": "2019-08-24T14:15:22Z",        "pre_assigned": true,        "released_at": "2019-08-24T14:15:22Z",        "released_by": "string",        "released_reason": "DEPARTURE_CANCELLED",        "rule_version_id": "string",        "scheduled_departure_id": "string",        "status": "CONFIRMED",        "superseded_at": "2019-08-24T14:15:22Z",        "superseded_by": "string",        "superseded_reason": "CONFLICT_RESOLUTION"      },      "vehicle_assignment": {        "accountable_carrier_id": "string",        "assigned_at": "2019-08-24T14:15:22Z",        "assigned_by": "string",        "eligibility_rule_version_id": "string",        "grant_id": "string",        "grant_number": "string",        "id": "string",        "originated_from": "OPERATOR",        "planned_from": "2019-08-24T14:15:22Z",        "planned_until": "2019-08-24T14:15:22Z",        "reason": "string",        "scheduled_departure_id": "string",        "status": "CONFIRMED",        "vehicle_id": "string"      }    }  ],  "vehicle_id": "string"}