SmartGare
API referenceEndpoints

Read who can replace a departure's coach

In the order the supervisor is offered them: the same carrier's coaches free over the departure's window that the register lets take it over (`SPARE`, replaced directly); then the same line's later departures of that carrier whose coach could swap, both departures still able to run (`SWAP`, recorded as a programme swap); then other carriers' coaches, free and admitted the same way, each needing an agreement (`OTHER_CARRIER`, replaced as a sub-contract). Reading records nothing. **Required permission:** `traffic.assignment:read`

GET/traffic/v1/departures/{departureId}/replacement-candidates

In the order the supervisor is offered them: the same carrier's coaches free over the departure's window that the register lets take it over (SPARE, replaced directly); then the same line's later departures of that carrier whose coach could swap, both departures still able to run (SWAP, recorded as a programme swap); then other carriers' coaches, free and admitted the same way, each needing an agreement (OTHER_CARRIER, replaced as a sub-contract). Reading records nothing.

Required permission: traffic.assignment:read

AuthorizationBearer <token>

In: header

Response Body

*/*

*/*

curl -X GET "https://example.com/traffic/v1/departures/{departureId}/replacement-candidates"
{  "assignment_id": "string",  "candidates": [    {      "authorization_id": "string",      "carrier_id": "string",      "kind": "SPARE",      "needs_agreement": true,      "partner_departure_id": "string",      "vehicle_id": "string"    }  ],  "carrier_id": "string",  "departure_id": "string",  "vehicle_id": "string"}