# Transport - Mountain Railway
# 1. Get Stations
Specific stations can be retrieved via two different calls. Via the station ID or by adding the name as an query parameter. Both options return the same result.
/transport/stations?name=Andermatt (opens new window)
Making a request to /transport/stations without any parameter, gives back a list of frequently requested stations.
# 2. Get Routes
After selecting two stations, we need to specify the departureStationId, arrivalStationId, the travelClass and the outwardTravelDate.
If we want to get the routes for a Two Way Ticket, we need to specify also the returnTravelDate.
WARNING
Be aware that this call can be expensive depending on the amount of possible routes between two stations.
# 2.1 Get Variants ( Optional )
Calling the variants endpoint with the selected route will return filter options that can be displayed (e.g. media restrictions, age groups, seat restrictions [this includes restrictions to connections]), those possible filter options can be also retrieved from the offers, by getting them beforehand one would be able to (depending on the UI) to save effort for subsequent offer requests by maybe also caching filter options for some time, expect this call to be nearly as expensive as creating offers, the value of it comes in with caching, one can expect that this call does not lead to some tickets already being reserved in a external system
# 3. Offers
Retrieving offers that can be put into cart (they also have prices), offers are persisted in the (external) system and expire after some (given) time, expect generating offers to be rather expensive. You will get offer variants and necessary personalization
# 4. Add to Cart
Putting the selected offer and its variants into cart alongside with the necessary personalization values
# Glossary
station - a defined place where you can start or end your journey or can transfer, a station can serve one or more modes
route - a defined way how to travel from the departure to the arrival station, a route may contain segments
variant - sub-part of an offer, a price is attached to it, while certain parameters of the offer are fixed across all variants (e.g. departure and arrival station) others change (e.g. route, media type)
addon - additional service and/or product that is available for a offer variant e.g. additional catering at the seat
mode - means of transport classification which describes how fast this means is, how often there are stops, how dynamic routes are etc. (e.g. bus, train, tram)
media - the available possibilities which can be used as medium for tickets (e.g. SwissPass, paper ticket)
offer - the possibility to buy a certain combination of tickets (those being offered) in a specified amount of time until the offer expires, when buying offers in the specified amount of time one can expect that this will be successful, requesting offers could lead to some sort of reservation being made
personalization - the process of tailoring a ticket to a specific person, the amount of data needed for personalization of a ticket can vary, it can also be possible that a ticket is unpersonalized i.e. anonymous
segment - part of a route or a connection, where at the beginning or at the end (or at both) a transfer is necessary, between segments the means of transport could change, within a segment there is no transfer