GetFastestDepartures

From Open Rail Data Wiki
Revision as of 20:57, 18 October 2016 by Q (talk | contribs) (GetFastestDepartures Sample query & responses)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Sample query & responses are shown below;

LDB-PUBLIC
https://lite.realtime.nationalrail.co.uk/OpenLDBWS/ldb9.asmx

Query:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:typ="http://thalesgroup.com/RTTI/2013-11-28/Token/types" xmlns:ldb="http://thalesgroup.com/RTTI/2016-02-16/ldb/">
   <soap:Header>
      <typ:AccessToken>
         <typ:TokenValue>nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn</typ:TokenValue>
      </typ:AccessToken>
   </soap:Header>
   <soap:Body>
      <ldb:GetFastestDeparturesRequest>
         <ldb:crs>LDS</ldb:crs>
         <ldb:filterList>
            <ldb:crs>YRK</ldb:crs>
         </ldb:filterList>
         <ldb:timeOffset>0</ldb:timeOffset>
         <ldb:timeWindow>120</ldb:timeWindow>
      </ldb:GetFastestDeparturesRequest>
   </soap:Body>
</soap:Envelope>

Response:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetFastestDeparturesResponse xmlns="http://thalesgroup.com/RTTI/2016-02-16/ldb/">
         <DeparturesBoard xmlns:lt3="http://thalesgroup.com/RTTI/2015-05-14/ldb/types" xmlns:lt5="http://thalesgroup.com/RTTI/2016-02-16/ldb/types" xmlns:lt4="http://thalesgroup.com/RTTI/2015-11-27/ldb/types" xmlns:lt="http://thalesgroup.com/RTTI/2012-01-13/ldb/types" xmlns:lt2="http://thalesgroup.com/RTTI/2014-02-20/ldb/types">
            <lt4:generatedAt>2016-10-18T21:53:42.6208277+01:00</lt4:generatedAt>
            <lt4:locationName>Leeds</lt4:locationName>
            <lt4:crs>LDS</lt4:crs>
            <lt4:platformAvailable>true</lt4:platformAvailable>
            <lt5:departures>
               <lt5:destination crs="YRK">
                  <lt5:service>
                     <lt4:sta>22:30</lt4:sta>
                     <lt4:eta>22:38</lt4:eta>
                     <lt4:std>22:33</lt4:std>
                     <lt4:etd>22:39</lt4:etd>
                     <lt4:platform>15B</lt4:platform>
                     <lt4:operator>TransPennine Express</lt4:operator>
                     <lt4:operatorCode>TP</lt4:operatorCode>
                     <lt4:serviceType>train</lt4:serviceType>
                     <lt4:delayReason>This train has been delayed by a broken down train</lt4:delayReason>
                     <lt4:serviceID>w4cW7jHkf1hS1TQwc5EjlQ==</lt4:serviceID>
                     <lt5:rsid>TP536400</lt5:rsid>
                     <lt5:origin>
                        <lt4:location>
                           <lt4:locationName>Manchester Airport</lt4:locationName>
                           <lt4:crs>MIA</lt4:crs>
                        </lt4:location>
                     </lt5:origin>
                     <lt5:destination>
                        <lt4:location>
                           <lt4:locationName>York</lt4:locationName>
                           <lt4:crs>YRK</lt4:crs>
                        </lt4:location>
                     </lt5:destination>
                  </lt5:service>
               </lt5:destination>
            </lt5:departures>
         </DeparturesBoard>
      </GetFastestDeparturesResponse>
   </soap:Body>
</soap:Envelope>


LDB-STAFF
https://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/ldbsv10.asmx

Query:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:typ="http://thalesgroup.com/RTTI/2013-11-28/Token/types" xmlns:ldb="http://thalesgroup.com/RTTI/2016-02-16/ldbsv/">
   <soap:Header>
      <typ:AccessToken>
         <typ:TokenValue>nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn</typ:TokenValue>
      </typ:AccessToken>
   </soap:Header>
   <soap:Body>
      <ldb:GetFastestDeparturesRequest>
         <ldb:crs>LDS</ldb:crs>
         <ldb:filterList>
            <ldb:crs>YRK</ldb:crs>
         </ldb:filterList>
         <ldb:time>21:55:00</ldb:time>
         <ldb:timeWindow>120</ldb:timeWindow>
         <ldb:filterTOC></ldb:filterTOC>
         <ldb:services>PBS</ldb:services>
      </ldb:GetFastestDeparturesRequest>
   </soap:Body>
</soap:Envelope>

Response:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetFastestDeparturesResponse xmlns="http://thalesgroup.com/RTTI/2016-02-16/ldbsv/">
         <DeparturesBoard xmlns:c1="http://thalesgroup.com/RTTI/2007-10-10/ldb/commontypes" xmlns:t6="http://thalesgroup.com/RTTI/2014-02-20/ldbsv/types" xmlns:t5="http://thalesgroup.com/RTTI/2012-01-13/ldbsv/types">
            <t6:generatedAt>2016-10-18T21:56:23.4554368+01:00</t6:generatedAt>
            <t6:locationName>Leeds</t6:locationName>
            <t6:crs>LDS</t6:crs>
            <t6:stationManager>Network Rail</t6:stationManager>
            <t6:stationManagerCode>RT</t6:stationManagerCode>
            <departures xmlns="http://thalesgroup.com/RTTI/2016-02-16/ldbsv/types">
               <destination crs="YRK">
                  <service>
                     <rid>201610188970730</rid>
                     <uid>Y70730</uid>
                     <trainid>1P64</trainid>
                     <rsid>TP536400</rsid>
                     <sdd>2016-10-18</sdd>
                     <operator>TransPennine Express</operator>
                     <operatorCode>TP</operatorCode>
                     <sta>2016-10-18T22:30:00</sta>
                     <eta>2016-10-18T22:38:12</eta>
                     <arrivalType>Forecast</arrivalType>
                     <std>2016-10-18T22:33:00</std>
                     <etd>2016-10-18T22:39:12</etd>
                     <departureType>Forecast</departureType>
                     <departureSource>Darwin</departureSource>
                     <platform>15B</platform>
                     <origin>
                        <t6:location>
                           <t5:locationName>Manchester Airport</t5:locationName>
                           <t5:crs>MIA</t5:crs>
                           <t5:tiploc>MNCRIAP</t5:tiploc>
                        </t6:location>
                     </origin>
                     <destination>
                        <t6:location>
                           <t5:locationName>York</t5:locationName>
                           <t5:crs>YRK</t5:crs>
                           <t5:tiploc>YORK</t5:tiploc>
                        </t6:location>
                     </destination>
                     <delayReason tiploc="">501</delayReason>
                     <category>XX</category>
                     <activities>T</activities>
                  </service>
               </destination>
            </departures>
         </DeparturesBoard>
      </GetFastestDeparturesResponse>
   </soap:Body>
</soap:Envelope>


National Rail Enquiries Data Feeds
Data Feeds About the Feeds Darwin Webservice (Public) Darwin Webservice (Staff) Historical Service Performance Push Port KnowledgeBaseDTDLocations (PoC)Real Time Journey Planner
LDB API About
LDB-SV API About
HSP About
DTD About Fares Timetable
Push Port About XML Schemas Schedules Associations Train Status Station Messages Alarms Train Order Train Alerts Formations Formation loading