Swap a coordination departure's coach with a later departure's
The departure's programmed coach cannot run it: the partner's coach takes it and the departure's coach takes the partner, the next departure of the line unless one is named. Kept beside the programme with its cause, reason, author and instant; the programme read and the designation before departure apply it, and every other departure keeps its coach. A coach already committed to either departure is replaced by the swapped one. **Required permission:** `traffic.programme-swap:write`
/traffic/v1/programme-swapsThe departure's programmed coach cannot run it: the partner's coach takes it and the departure's coach takes the partner, the next departure of the line unless one is named. Kept beside the programme with its cause, reason, author and instant; the programme read and the designation before departure apply it, and every other departure keeps its coach. A coach already committed to either departure is replaced by the swapped one.
Required permission: traffic.programme-swap:write
Authorization
oauth2 In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
*/*
*/*
curl -X POST "https://example.com/traffic/v1/programme-swaps" \ -H "Content-Type: application/json" \ -d '{ "cause": "string", "departure_id": "string", "reason": "string" }'{ "cause": "DRIVER_ABSENT", "commitment_ids": [ "string" ], "departure_authorization_id": "string", "departure_id": "string", "departure_vehicle_id": "string", "id": "string", "line_id": "string", "partner_authorization_id": "string", "partner_departure_id": "string", "partner_vehicle_id": "string", "reason": "string", "recorded_at": "2019-08-24T14:15:22Z", "recorded_by": "string", "withdrawn_at": "2019-08-24T14:15:22Z", "withdrawn_by": "string"}Correct an occupancy recorded in error
Appends a correction naming the arrival or departure entry recorded in error and the instant that is true instead; the entry stays as it was, the bay's occupancy carries the true instant, and the correction is announced with instants only. **Required permission:** `traffic.occupancy-correction:write`
Withdraw a programme swap
Puts both departures back on their programmed coach while neither has gone; a coach already committed under the swap is replaced by the programmed one. The swap is kept, with who withdrew it and when. **Required permission:** `traffic.programme-swap:write`