SmartGare
API referenceEndpoints

Read what a departure is committed to

Returns the live commitments and the moment the answer was current as of, so a stale answer can be recognised as stale. A departure committed to nothing answers with nothing rather than failing. Once a coach is committed, it also answers the bay the fixed-bay plan gives the departure's line and the coach's authorization that day, or that the plan names none. **Required permission:** `traffic.assignment:read`

GET/traffic/v1/departures/{departureId}/assignments

Returns the live commitments and the moment the answer was current as of, so a stale answer can be recognised as stale. A departure committed to nothing answers with nothing rather than failing. Once a coach is committed, it also answers the bay the fixed-bay plan gives the departure's line and the coach's authorization that day, or that the plan names none.

Required permission: traffic.assignment:read

AuthorizationBearer <token>

In: header

Response Body

*/*

curl -X GET "https://example.com/traffic/v1/departures/{departureId}/assignments"
{  "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"  },  "current_as_of": "2019-08-24T14:15:22Z",  "fixed_bay": {    "bay_id": "string",    "fixed_bay_id": "string",    "status": "PLANNED"  },  "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"  }}