SmartGare
API referenceEndpoints

Ask for a coach recommendation

Ranks the departures submitted by the station's criteria in the order in force, and answers the coach chosen, the criterion that decided, and what became of every other candidate. A ruling is recorded and announced even when no coach is named. **Required permission:** `ticketing.recommendation:request`

POST/ticketing/v1/recommendations

Ranks the departures submitted by the station's criteria in the order in force, and answers the coach chosen, the criterion that decided, and what became of every other candidate. A ruling is recorded and announced even when no coach is named.

Required permission: ticketing.recommendation:request

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*RecommendCoachRequest

Response Body

*/*

curl -X POST "https://example.com/ticketing/v1/recommendations" \  -H "Content-Type: application/json" \  -d '{    "requested_station_id": "string",    "selling_station_id": "string",    "service_date": "2019-08-24"  }'
{  "decided_by": "string",  "id": "string",  "order": "string",  "proposals": [    {      "coaches": [        {          "departure_id": "string",          "leaves_at": "2019-08-24T14:15:22Z",          "travellers": 0        }      ],      "kind": "string"    }  ],  "proposals_withheld": "string",  "recommended_departure_id": "string",  "steps": [    {      "criterion": "string",      "exclusions": [        {          "criterion": "string",          "departure_id": "string",          "reason": "string"        }      ],      "status": "string",      "surviving_departure_ids": [        "string"      ]    }  ],  "tied_departure_ids": [    "string"  ],  "unanswered_conditions": [    {      "condition": "string",      "departure_id": "string"    }  ],  "unavailable_criteria": [    "string"  ]}