Search the departures sellable for a journey
Lists the departures of a station operational day that a sale from one of our stations to the station travelled to could still be made on, each priced as that sale would be and with the seats still free on every stretch of the journey — null while nobody has stated its seats. A departure that is cancelled, withdrawn, closed or gone, or that does not reach the station travelled to after the station sold from, is not offered. A departure whose route was declared without distances is offered with no distance, priced only by a tariff row that needs none. Given a `time`, only the departures leaving at or after it, station time, on that day are offered. With no `date`, the search reaches from its instant as far as the station's search horizon, answered as `reachesUntil` with the rule version that set it, or the station's day of the search while none is in force. The departures are put to the station's coach selection: the one it recommends comes first, then every other earliest first, and `recommendation` carries the ruling to record on the sale, the criterion that decided and why each other departure lost — or, with status UNAVAILABLE, why there is none. When nothing answers the request as made, the search is widened: `widening` lists every relaxation in order (TIME_OF_DAY, OTHER_CARRIERS unless the station's rule orders others, among them OTHER_COACH_TYPES and LATER_DAYS) with its outcome, and each offer names the `relaxation` that found it; both are null when the request as made is answered. `time`, `passengers` and `carrier_id` repeat the request as made, never the offers found. **Required permission:** `ticketing.sale:read`
/ticketing/v1/departuresLists the departures of a station operational day that a sale from one of our stations to the station travelled to could still be made on, each priced as that sale would be and with the seats still free on every stretch of the journey — null while nobody has stated its seats. A departure that is cancelled, withdrawn, closed or gone, or that does not reach the station travelled to after the station sold from, is not offered. A departure whose route was declared without distances is offered with no distance, priced only by a tariff row that needs none. Given a time, only the departures leaving at or after it, station time, on that day are offered. With no date, the search reaches from its instant as far as the station's search horizon, answered as reachesUntil with the rule version that set it, or the station's day of the search while none is in force. The departures are put to the station's coach selection: the one it recommends comes first, then every other earliest first, and recommendation carries the ruling to record on the sale, the criterion that decided and why each other departure lost — or, with status UNAVAILABLE, why there is none. When nothing answers the request as made, the search is widened: widening lists every relaxation in order (TIME_OF_DAY, OTHER_CARRIERS unless the station's rule orders others, among them OTHER_COACH_TYPES and LATER_DAYS) with its outcome, and each offer names the relaxation that found it; both are null when the request as made is answered. time, passengers and carrier_id repeat the request as made, never the offers found.
Required permission: ticketing.sale:read
Authorization
oauth2 In: header
Query Parameters
0 <= length <= 1200 <= length <= 120Station operational day, as YYYY-MM-DD. Absent, the search reaches from its instant as far as the station's search horizon (answered as reachesUntil), or the station's day of the search while none is in force.
Time of day the traveller wants to leave from, station time, as HH:mm: only departures leaving at or after it on that day are offered.
Seats the party needs on one departure, 1 to 99, one when absent: coach selection sets aside a departure with fewer seats left, never splitting the party.
int321 <= value <= 99The carrier the traveller names, a referential carrier id: only its departures are offered, earliest first, with no recommendation (status UNAVAILABLE, reason carrier_named).
0 <= length <= 120Response Body
*/*
*/*
curl -X GET "https://example.com/ticketing/v1/departures?from_station_id=string&to_station_id=string"{ "carrier_id": "string", "currency": "string", "date": "string", "departures": [ { "carrier": { "id": "string", "name": "string" }, "departs_at": "2019-08-24T14:15:22Z", "departure_id": "string", "departure_zone": { "code": "string", "id": "string", "name": "string" }, "distance_meters": 0, "fare": { "content_hash": "string", "row_id": "string", "steps": [ { "amount": 0, "kind": "string", "row_id": "string" } ], "tariff_release_id": "string" }, "fares": [ { "category": "string", "fare": { "content_hash": "string", "row_id": "string", "steps": [ { "amount": 0, "kind": "string", "row_id": "string" } ], "tariff_release_id": "string" }, "label": "string", "priced": true, "unit_fare": 0 } ], "line_code": "string", "line_id": "string", "priced": true, "relaxation": "TIME_OF_DAY", "seats_available": 0, "service_type": "ARRIVEE", "unit_fare": 0 } ], "from_station_id": "string", "passengers": 0, "reaches_until": "2019-08-24T14:15:22Z", "recommendation": { "decided_by": "string", "id": "string", "proposals": [ { "coaches": [ { "departure_id": "string", "leaves_at": "2019-08-24T14:15:22Z", "travellers": 0 } ], "kind": "string" } ], "proposals_withheld": "string", "recommended_departure_id": "string", "set_aside": [ { "criterion": "string", "departure_id": "string", "reason": "string" } ], "status": "RECOMMENDED", "tied_departure_ids": [ "string" ], "unavailable_criteria": [ "string" ], "unavailable_reason": "string" }, "search_horizon_rule_version_id": "string", "tariff_release_id": "string", "time": "string", "to_station_id": "string", "widening": { "relaxations": [ { "day": "2019-08-24", "outcome": "FOUND", "relaxation": "TIME_OF_DAY" } ], "rule_version_id": "string" }}List the station's counters
Returns every workstation the station operates, in its catalog's order, each with the agent session open there, whoever holds it, or null when nobody is signed in. While the deployment declares no catalog, the workstations are those an open session is held at. **Required permission:** `ticketing.agent-session:read`
Search the departures sellable to a town
Returns, earliest first, every departure of the day the journey search offers from the station sold from to a station of the town, each as that search offers it — line, distance, fare per passenger and seats still free — with the station it gets off at (alighting), the station it boards at (boarding) and the last stop of its route (terminus, null when the referential does not know that station). A station retired or a town suspended is not offered; a town nobody serves offers nothing. Given a `time`, only the departures leaving at or after it, station time, on that day are offered. With no `date`, it reaches as the journey search does, as far as the station's search horizon. Refused like the journey search. The departures are put to the station's coach selection as the journey search puts them, the one it recommends first; when they get off at several stations of the town, `recommendation` is UNAVAILABLE with reason several_alighting_stations. When nothing answers the request as made, the search is widened as the journey search is, under `widening`, each offer naming the `relaxation` that found it. `time`, `passengers` and `carrier_id` repeat the request as made, never the offers found. **Required permission:** `ticketing.sale:read`