SmartGare
API referenceEndpoints

Give a departure's coach back

Ends the departure's coach commitment by hand, under a reason from the undo list, with no other coach taking its place: the coach is free for another departure over the same window, and the departure keeps its bay, provisional again until a new coach is committed. A caller without the planner's right gives back only a coach of the current station day. **Required permission:** `traffic.vehicle-assignment:undo`

POST/traffic/v1/vehicle-assignments/{id}/release

Ends the departure's coach commitment by hand, under a reason from the undo list, with no other coach taking its place: the coach is free for another departure over the same window, and the departure keeps its bay, provisional again until a new coach is committed. A caller without the planner's right gives back only a coach of the current station day.

Required permission: traffic.vehicle-assignment:undo

AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*UndoVehicleAssignmentRequest

Response Body

*/*

*/*

curl -X POST "https://example.com/traffic/v1/vehicle-assignments/string/release" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{  "id": "string",  "provisional_bay_assignment_id": "string",  "reason": "COACH_BROKEN_DOWN",  "released_at": "2019-08-24T14:15:22Z",  "released_by": "string",  "scheduled_departure_id": "string",  "vehicle_id": "string"}