SmartGare
API referenceEndpoints

Suggest bays for a departure

Returns the bays an assignment would accept for the departure over the window, best first: bays of a family the station prefers for the line, then the others, each in the order the bays are signed. A bay too short for the committed coach, one a coach still stands at, and one held by another departure, held aside or out of service for the window are left out. Nothing is assigned; an empty list means no bay fits. **Required permission:** `traffic.assignment:read`

POST/traffic/v1/bay-suggestions

Returns the bays an assignment would accept for the departure over the window, best first: bays of a family the station prefers for the line, then the others, each in the order the bays are signed. A bay too short for the committed coach, one a coach still stands at, and one held by another departure, held aside or out of service for the window are left out. Nothing is assigned; an empty list means no bay fits.

Required permission: traffic.assignment:read

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*SuggestBaysRequest

Response Body

*/*

*/*

*/*

curl -X POST "https://example.com/traffic/v1/bay-suggestions" \  -H "Content-Type: application/json" \  -d '{    "planned_from": "2019-08-24T14:15:22Z",    "planned_until": "2019-08-24T14:15:22Z",    "scheduled_departure_id": "string"  }'
{  "data": [    {      "bay_code": "string",      "bay_id": "string",      "family": "string",      "family_rule_version_id": "string",      "preferred": true    }  ]}