Please see here (look for Train tab) for the list of currently available rail supplier on our live system and the supported features. We are constantly adding new rail supplier and new features on existing supplier.
Rail suppliers are supported within the flights API, with a few minor differences. To illustrate these differences, an example XML is given below for a search from London to Manchester:
Various location types for Origin and Destination can be used in the request as specified in the flight search API spec. As with flight search, to search cities <Type> should be set to "airportgroup" and to search airports <Type> should be set to "airportcode". The possible types are covered in the our start routing API documentation. In addition to this if a specific trainstation is to be searched then <Type> "trainstationcode" can be entered, this can be used to specify individual stations. If you wish to do this, please contact Travelfusion for more information. A radius of 1m is recommended to ensure no other stations are searched.using the specific Travelfusion train station code. A list of train stations that is supported can be requested by the ListTrainStations command documented below.
The results will be very similar to normal flight results, but the partial response sample below illustrates the main differences between flight and train results:
Summary of differences:
In the RequestedLocations, the location type may be trainstation. This is in cases where a specific station is requested from the supplier, because a specific station is requested from Travelfusion or the supplier does not support a city-based searching and so individual stations must be requested. In these cases, the Descriptor will be the Travelfusion station code.
In the Segment, the Origin (and Destination) will normally have type trainstation. The code will be the Travelfusion station code if it is resolvable to one of our codes, if not we simply display the returned station name. The origin code of the first segment and the destination code of the last segment will always be Travelfusion station codes.
In the Summary, there is a new element 'StationList'. This lists the relevant stations, with their related cities and the Travelfusion code and name for the station.
List Train Stations
The ListTrainStations returns the trains stations codes as defined on Travelfusion side and the station names and coordinates for a particular rail supplier when <Supplier> element is filled. To obtain the complete Travelfusion stations codes list please omit the <Supplier> entry and add <IsTest> entry set to false. This request should not be performed more often than once per day for each supplier, and infrequently for the full station list since our list does not change that much. It should be accessed during off-peak hours wherever possible (00:00 to 07:00 UK time).
Example of obtaining supplier specific station list.
If the <Supplier> element is omitted we output a test reponse:
Because the <IsTest> element is missing and not set to false it gives a short test reponse to prevent accidental queries that could waste processing time and bandwidth. Please note that in this case the returned data is "|" delimited in order to minimise response size. The test response shows the format of the data returned starting with tfCode which is the Travelfusion station code, followed by the Country of the station, it's latitude and longitude and finally its name. To get the full list the following query should be submitted:
List Countries Routes
The GetSupplierCountryList return the countries that the train supplier supports. This can also be seen as a retriction to what kind of search locations can be used. Note that although some suppliers might support a particular country they might only have a few stations searchable in that country, to get the specific stations it's best to call ListTrainStations for a closer view.
Example of obtaining specific supplier country list.
Most trains supplier support discount cards. Although the specific discount cards and type vary between trains supplier, Travelfusion has unified the process. The discount card types should be submitted in the StartRouting request, one per traveller.