SmartGare
API referenceEndpoints

Read a ruling back

Answers one ruling as it was issued: what was asked, what was chosen, what became of every candidate, and the policy and engine versions it can be replayed against. Only a ruling issued at a station this deployment runs, and to the caller unless they hold ticketing.recommendation:read-any; any other is answered as not found. **Required permission:** `ticketing.recommendation:read`

GET/ticketing/v1/recommendations/{recommendationId}

Answers one ruling as it was issued: what was asked, what was chosen, what became of every candidate, and the policy and engine versions it can be replayed against. Only a ruling issued at a station this deployment runs, and to the caller unless they hold ticketing.recommendation:read-any; any other is answered as not found.

Required permission: ticketing.recommendation:read

AuthorizationBearer <token>

In: header

Response Body

*/*

curl -X GET "https://example.com/ticketing/v1/recommendations/{recommendationId}"
{  "actor": "string",  "asked_through": "string",  "candidates": [    {      "criterion": "string",      "departure_id": "string",      "outcome": "string",      "position": 0,      "reason": "string"    }  ],  "considered_count": 0,  "decided_at": "2019-08-24T14:15:22Z",  "decided_by_criterion": "string",  "decided_by_order": "string",  "engine_version": "string",  "id": "string",  "policy_version_id": "string",  "proposals": [    {      "departure_id": "string",      "kind": "string",      "leaves_at": "2019-08-24T14:15:22Z",      "position": 0,      "travellers": 0    }  ],  "proposals_withheld": "string",  "recommended_departure_id": "string",  "requested_station_id": "string",  "seats_requested": 0,  "selling_station_id": "string",  "service_date": "2019-08-24",  "steps": [    {      "criterion": "string",      "exclusions": [        {          "criterion": "string",          "departure_id": "string",          "reason": "string"        }      ],      "status": "string",      "surviving_departure_ids": [        "string"      ]    }  ],  "unavailable_criteria": [    "string"  ]}