1. Search

Initiate Request:

<request version="4.0">
  <auth>
    <username>example</username>
    <password>example</password>
    <agent>example</agent>
  </auth>
  <trains-search roundTrip="true">
    <dates>
      <departure>2014-12-15</departure>
      <departureReturn>2014-12-25</departureReturn>
    </dates>
    <area type="origin" entityType="location" entityID="3474"/>
    <area type="destination" entityType="metropolitan" entityID="PAR"/>
    <filters>
    </filters>
    <pax-group customerCountryCode="UK">
      <pax>
        <adults count="2"/>
        <children count="2">
          <age>5</age>
          <age>8</age>
        </children>
      </pax>
    </pax-group>
    <currencies default="EUR">
      <currency code="EUR"/>
      <currency code="GBP"/>
      <currency code="USD"/>
    </currencies>
  </trains-search>
</request>
Request Parameters:

 Parameter Type Comments
trains-search @roundTripbooleanis the search made for 1 way or with return
dates/departureYYYY-mm-ddthe date of departure trip
dates/departureReturnYYYY-mm-ddthe date of the return trip
area @typeorigin/destinationorigin or destination
area @entityTypelocation/metropolitanlocation/metropolitan code
area @entityIdstring either cityid or a 3 letter terminal code  
 pax-group @customerCountryCode country code2 letter ISO code for the customer country
 pax nodethe pax node describing the people who should be on the train
 pax/adults @count intthe number of adults
 pax/children @count intthe number of children
 pax/children/age intthe age of each child
 currencies @defaultcurrency 3 letter ISO code for the default currency
 currencies/currency @code currency3 letter ISO code for the accepted currency

Notes

  1. dates/departureReturn is mandatory only if the @roundTrip option is set to "true"
  2. customerCountryCode is mandatory, and the same code should be used for the entire session flow. i.e. when searching for a specific country code, you must use the same country code for booking.
  3. children are optional. if you are not search for a room with children, do not include the children node.
  4. currencies are returned according to the list in the request. properties that use a currency that does not appear on the list will be converted to the "default" currency. to remove restrictions and return all currencies, add an attribute to the currencies node: all="true"
  5. the "metropolitan" code is a IATA code of the city (like "LON" for london, or "PAR" for paris)
Asynchronous Response:
<response success="1" session="dv.1234">
  <search status="working">
    <server>http://mishor.example.com/</server>
  </search>
</response>

The Asynchronous response consists of the following elements:
Parameter Type Comments
response @successboolean was the request successful
response @sessionstring the search id of the requested search
serverurlthe url  of the search server to use for polling and booking


Initiate Poll

With the search response session id, it is now possible to start polling the results. For a description of the flow, please revert to section 3: Search Flow
Poll Request
<request version="4.0">
  <auth>
    <username>example</username>
    <password>example</password>
    <agent>example</agent>
  </auth>
  <trains-poll session="dv.1234" last="0"/>
</request>

Parameter Type Comments
trains-poll @sessionstringthe session id of the requested search
trains-poll @lastintthe last @last attribute received from the previous poll

Poll Response

<?xml version="1.0" encoding="UTF-8"?>
<response success="1" time="2017-07-18 08:48:37" session="dv.1234">
  <job status="done"/>
  <results last="1" count="67">
    <result token="dv.20572315774" providers="Trains" onrequest="0" pricingType="net" fareSource="" fareCRS="" prePaid="1">
      <price amount="330" currency="EUR" final="0" commissionable="1" billable="1" minCommissionablePrice=""/>
      <pricedetails/>
      <outbound>
        <connection id="0">
          <info travelTime="P0DT3H27M"/>
          <segment id="1">
            <info technicalStops="4" carrierOperated=""/>
            <departure terminal="AMSTERDAM CS(AMSTERDAM)" date="2017-07-30" time="06:17:00"/>
            <arrival terminal="PARIS NORD(PARIS)" date="2017-07-30" time="09:44:00"/>
            <tripNumber>9310</tripNumber>
          </segment>
        </connection>
      </outbound>
    </result>
    <result token="dv.205723157717" providers="Trains" onrequest="0" pricingType="net" fareSource="" fareCRS="" prePaid="1">
      <price amount="440" currency="EUR" final="0" commissionable="1" billable="1" minCommissionablePrice=""/>
      <pricedetails/>
      <outbound>
        <connection id="0">
          <info travelTime="P0DT3H27M"/>
          <segment id="2">
            <info technicalStops="4" carrierOperated=""/>
            <departure terminal="AMSTERDAM CS(AMSTERDAM)" date="2017-07-30" time="08:17:00"/>
            <arrival terminal="PARIS NORD(PARIS)" date="2017-07-30" time="11:44:00"/>
            <tripNumber>9322</tripNumber>
          </segment>
        </connection>
      </outbound>
    </result>
    <!-- From here inbound search results -->
    <result token="dv.205723157757" providers="Trains" onrequest="0" pricingType="net" fareSource="" fareCRS="" prePaid="1">
      <price amount="380" currency="EUR" final="0" commissionable="1" billable="1" minCommissionablePrice=""/>
      <pricedetails/>
      <outbound/>
      <inbound>
        <connection id="0">
          <info travelTime="P0DT3H17M"/>
          <segment id="3">
            <info technicalStops="4" carrierOperated=""/>
            <departure terminal="PARIS NORD(PARIS)" date="2017-08-07" time="06:25:00"/>
            <arrival terminal="AMSTERDAM CS(AMSTERDAM)" date="2017-08-07" time="09:42:00"/>
            <tripNumber>9303</tripNumber>
          </segment>
        </connection>
      </inbound>
    </result>
    <result token="dv.205723157788" providers="Trains" onrequest="0" pricingType="net" fareSource="" fareCRS="" prePaid="1">
      <price amount="696" currency="EUR" final="0" commissionable="1" billable="1" minCommissionablePrice=""/>
      <pricedetails/>
      <outbound/>
      <inbound>
        <connection id="0">
          <info travelTime="P0DT3H59M"/>
          <segment id="1">
            <info technicalStops="0" carrierOperated=""/>
            <departure terminal="PARIS NORD(PARIS)" date="2017-08-07" time="11:55:00"/>
            <arrival terminal="BRUXELLES MIDI(BRUSSELS)" date="2017-08-07" time="13:17:00"/>
            <tripNumber>9337</tripNumber>
          </segment>
          <segment id="2">
            <info technicalStops="1" carrierOperated=""/>
            <departure terminal="BRUXELLES MIDI(BRUSSELS)" date="2017-08-07" time="14:02:00"/>
            <arrival terminal="AMSTERDAM CS(AMSTERDAM)" date="2017-08-07" time="15:54:00"/>
            <tripNumber>9126</tripNumber>
          </segment>
        </connection>
      </inbound>
    </result>
  </results>
</response>



Parameter Type Comments
response @successbooleanwas the request successfull
job @statusstring"working" or "done"

results @last intkeep this number for the next poll (see request)
results @count inthow many results were returned in this specific poll response
result @id intthe identifier of the specific result
result @providers stringcomma separated string of providers available for this property
result @pricingType net/gross 
result @fareSourcestring the source of the fare (which system) 
result @fareCRSstringthe CRS of the fare (code) 
result @prePaidboolean is the ticket pre-paid or should be paid by the client 
result @onrequestboolean
result/price node availablity coming from innstant.travel
result/price @currency currency 3 letter ISO currency code
result/price @minCommissionablePrice doublethe minimum commissionable price - appears only if such result is available
result/price @minNonCommissionablePrice doublethe minimum non-commissionable price - appears only if such result is available
outboundnodethe outbound trip information 
outbound/connectionnodeconnection is an "option" for a trip plan between the departure and arrival terminals
outbound/connection @id intan identifier for the connected
outbound/connection/info @travelTime  date interval stringISO 8601 time interval string to show the duration of the entire flight
outbound/connection/segmentnode a segment is one "leg" of a trip plan 
outbound/connection/segment/
tripNumber
integerthe trip number 
outbound/connection/segment/
departure @terminal
terminal code3 letter ISO code of the departure terminal 
outbound/connection/segment/
departure @date
datedeparture date in the terminal local time zone
 outbound/connection/segment/
departure @time
timedeparture time in the terminal local time zone 
outbound/connection/segment/
arrival @terminal
terminal code3 letter ISO code of the arrival terminal
outbound/connection/segment/
arrival @date
datearrival date in the terminal local time zone
 outbound/connection/segment/
arrival @time
timearrival time in the terminal local time zone

Notes

  1. The first poll request should be sent at least 3 seconds after the search response. You also need to wait at least 3 seconds between poll requests. If you have direct providers set up you need to consult with your account manager regarding the timing.
  2. If there are no results from your direct providers, the non-billable-price node will not be returned
  3. it is not allowed to add commission on top of non-commissionable items
  4. Dates and Times are returned in the local terminal timezone
  5. the @travelTime format is based on the ISO 8601 standard. for example, "P3DT4H15M" means 3 days, 4 hours and 15 mintues. "P" is the prefix, "T" means the time.

Comments