1. Search

The dynamic package search is basically multiple searches grouped under 1 request

<request version="4.0">
    <auth>
        <username>example</username>
        <password>example</password>
        <agent>test</agent>
    </auth>
    <packages-search onlyRefundable="true">
                <hotel-search entityType="location" entityID="4223">
            <package-filters>
               <package-filter type="averageResults">
                <filter type="stars" restricted="0">2,3,4</filter>
                <filter type="rating">3.0,3.5,4.5,5</filter>
                <filter type="distance">0.9</filter>
                <filter type="preferredHotels" restricted="0">222,333</filter>
              </package-filter>
              <package-filter type="advancedResults" priceSort="median">
                <filter type="stars" restricted="0">3,4,5</filter>
                <filter type="rating">3.5,4.5,5</filter>
                <filter type="distance">0.7</filter>
                <filter type="preferredHotels" restricted="0">106,107</filter>
              </package-filter>
            </package-filters>
            <dates from="2014-10-05" to="2014-10-07" />
            <filters>
                <filter type="onrequest">0</filter>
                <filter type="showSpecialDeals">1</filter>
            </filters>
            <pax-group customerCountryCode="DE">
                <pax>
                    <adults count="2" />
                </pax>
            </pax-group>
        </hotel-search>
        <hotel-search entityType="location" entityID="3474">
            <dates from="2014-11-05" to="2014-11-07" />
            <filters>
                <filter type="onrequest">0</filter>
                <filter type="showSpecialDeals">1</filter>
            </filters>
            <pax-group customerCountryCode="DE">
                <pax>
                    <adults count="2" />
                </pax>
            </pax-group>
        </hotel-search>
        <transfers-search roundTrip="true">
            <area type="origin" entityType="terminal" entityID="1720" />
            <area type="destination" entityType="hotel" entityID="5500" />
            <dates>
                <arrival date="2014-10-30" time="12:00" />
                <departure date="2014-10-31" time="12:00" />
            </dates>
            <pax-group customerCountryCode="DE">
                <pax>
                    <adults count="2" />
                </pax>
            </pax-group>
        </transfers-search>
        <flights-search roundTrip="true">
            <dates>
                <departure>2014-11-23</departure>
                <departureReturn>2014-11-26</departureReturn>
            </dates>
            <terminals>
                <origin>AMS</origin>
                <destination>JFK</destination>
            </terminals>
            <filters>
                <filter type="isNonStop">0</filter>
            </filters>
            <pax-group customerCountryCode="DE">
                <pax>
                    <adults count="1" />
                    <children count="0" />
                </pax>
            </pax-group>
        </flights-search>
        <cars-search>
            <destinations>
                <destination type="pickUp" stationId="1216" date="2014-10-23" time="12:00" />
                <destination type="dropOff" stationId="1216" date="2014-10-24" time="12:00" />
            </destinations>
            <pax-group customerCountryCode="DE">
                <pax>
                    <adults count="1" />
                    <children count="0" />
                </pax>
            </pax-group>
        </cars-search>
        <currencies default="EUR">
            <currency code="EUR" />
            <currency code="GBP" />
            <currency code="USD" />
        </currencies>        
    </packages-search>
</request>
Parameter Type Comments
packages-search @onlyRefundablebooleantrue/false - return only products that can be cancelled without charge during or shortly after the booking
package-filtersnodeoptional node to adjust the content of the returned packages 
package-filters / package-filter @typestringwhich package the filters apply to: advancedResults / averageResults / minResults
package-filter / filter @typestring one of the following optional filters:  stars / rating / distance / preferredHotels *see note #3 for details
Notes
1. setting @onlyRefundable attribute to true will return much (much!) less results
2. For details on each service, you can look at each individual service page on this API document
3. the optional package filters enables you to control the content of the package you receive. for example, you can state that you want only 3-4 star hotels (not 1,2 or 5), or that you want only central hotels.
3.1 the "preferredHotels" filter is a list of hotel ids, separated by a comma, and ordered by priory. you can state that you want hotel X, if X has no availability take Y, if Y has no availability take Z and so on. you can use the "restricted" attribute (boolean, 0 or 1) to state whether to return any hotels in case X, Y, and Z are all not available. 0 means return a hotel, 1 means don't return an alternative hotel.
3.2 the optional "distance" filter allows you to restrict the distance of the selected hotel from the center of the city you're searching in. the scale is 0-1 where closest to 0 (minimum value should be 0.1) is the center, and 1 is the outskirts of the city.
4. on the "advancedResults" filter, you can add the following attribute "priceSort" with the values "median" or "minimum". this will return the median or minimum result in terms of prices after applying all the relevant filters.

Asynchronous Response:
<response success="1" session="dv.Uw8IU6CsA">
  <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

Synchronous work:
In order to work in a synchronous flow, you can include the following node in your request as a child node of the "hotel-search" node:
<nopolls-timeout>20</nopolls-timeout>

This will skip the Asynchronous response above and the poll request step below and return the poll-response after X seconds mentioned in the node value. in the example above you will get a response after 20 seconds.

NOTE: it is highly encouraged NOT to use this method and work in an Asynchronous flow, as you and your customers will be missing on many prices, offers, and deals.

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>test</agent>
  </auth>
  <packages-poll session="dv.Uw8IU6CsA" last="0"/>
</request>

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

Poll response

<?xml version="1.0"?>
<response success="1" session="dv.591447245107">
  <job status="working" />
  <packages>
    <package type="minResults">
      <hotel id="102838" sessionId="dv.5914472453107">
        <searchRequest>
          <locationEntity entityType="location" entityID="4223" />
          <dates from="2014-12-10" to="2014-12-12" />
        </searchRequest>
        <room resultid="dv.7475472461242" onrequest="0" billable="0" minquantity="1" maxquantity="1">
          <price amount="688.18" currency="USD" />
          <provider>HotelsDemo3</provider>
          <name><![CDATA[Classic Twin Room]]></name>
          <board code="RO"><![CDATA[Room Only]]></board>
          <pax>
            <adults>2</adults>
          </pax>
        </room>
        <room resultid="dv.7472472461244" onrequest="0" billable="1" minquantity="1" maxquantity="1">
          <price amount="21.46" currency="USD" />
          <provider>HotelsDemo1</provider>
          <name><![CDATA[Economy Double Room]]></name>
          <board code="BB"><![CDATA[Breakfast]]></board>
          <pax>
            <adults>2</adults>
          </pax>
        </room>
      </hotel>
      <hotel id="145205" sessionId="dv.5914472455107">
        <searchRequest>
          <locationEntity entityType="location" entityID="3474" />
          <dates from="2014-11-05" to="2014-11-07" />
        </searchRequest>
        <room resultid="dv.7473472463507" onrequest="0" billable="0" minquantity="1" maxquantity="1">
          <price amount="546.2" currency="USD" />
          <provider>HotelsDemo3</provider>
          <name><![CDATA[Double Next Generation]]></name>
          <board code="RO"><![CDATA[Room Only]]></board>
          <pax>
            <adults>2</adults>
          </pax>
        </room>
        <room resultid="dv.7474472463507" onrequest="1" billable="1" minquantity="1" maxquantity="1">
          <price amount="15.93" currency="USD" />
          <provider>HotelsDemo2</provider>
          <name><![CDATA[Double Room]]></name>
          <board code="RO"><![CDATA[Room Only]]></board>
          <pax>
            <adults>2</adults>
          </pax>
        </room>
      </hotel>
      <transfers sessionId="dv.5914472457107">
        <searchRequest>
          <area type="origin" entityType="terminal" entityID="1720" />
          <area type="destination" entityType="hotel" entityID="5500" />
          <dates>
            <arrival date="2014-10-30" time="12:00" />
            <departure date="2014-10-31" time="12:00" />
          </dates>
        </searchRequest>
        <transfer resultid="dv.74844725214" onrequest="0" billable="1" type="arrival">
          <price amount="101.680" currency="USD" />
          <provider>TransfersDemo8</provider>
          <vehicleType><![CDATA[Van with meet and greet Spanish or Portuguese]]></vehicleType>
          <transferType><![CDATA[Shared with meet and greet Spanish or Portuguese]]></transferType>
          <origin type="terminal" id="1720">
            <locationName><![CDATA[New York, John F. Kennedy International Airport]]></locationName>
            <locationInfo>
              <name><![CDATA[John F Kennedy International Airport]]></name>
              <city><![CDATA[New York]]></city>
              <state><![CDATA[New York]]></state>
              <country><![CDATA[United States]]></country>
              <latitude>40.639751</latitude>
              <longitude>-73.778925</longitude>
            </locationInfo>
          </origin>
          <destination type="hotel" id="5500">
            <locationName><![CDATA[Manhattan Area Hotels]]></locationName>
            <locationInfo>
              <name><![CDATA[Hilton New York]]></name>
              <address><![CDATA[1335 AVENUE OF THE AMERICAS,, New York, United States]]></address>
              <latitude>40.7622</latitude>
              <longitude>-73.9788</longitude>
            </locationInfo>
          </destination>
          <images>
            <image />
          </images>
        </transfer>
        <transfer resultid="dv.74844725228" onrequest="0" billable="1" type="return">
          <price amount="101.680" currency="USD" />
          <provider>TransfersDemo8</provider>
          <vehicleType><![CDATA[Van with meet and greet Spanish or Portuguese]]></vehicleType>
          <transferType><![CDATA[Shared with meet and greet Spanish or Portuguese]]></transferType>
          <origin type="hotel" id="5500">
            <locationName><![CDATA[Manhattan Area Hotels]]></locationName>
            <locationInfo>
              <name><![CDATA[Hilton New York]]></name>
              <address><![CDATA[1335 AVENUE OF THE AMERICAS,, New York, United States]]></address>
              <latitude>40.7622</latitude>
              <longitude>-73.9788</longitude>
            </locationInfo>
          </origin>
          <destination type="terminal" id="1720">
            <locationName><![CDATA[New York, John F. Kennedy International Airport]]></locationName>
            <locationInfo>
              <name><![CDATA[John F Kennedy International Airport]]></name>
              <city><![CDATA[New York]]></city>
              <state><![CDATA[New York]]></state>
              <country><![CDATA[United States]]></country>
              <latitude>40.639751</latitude>
              <longitude>-73.778925</longitude>
            </locationInfo>
          </destination>
          <images>
            <image />
          </images>
        </transfer>
      </transfers>
      <flight sessionId="dv.5914472459107" resultid="dv.7501472581" onrequest="0" billable="1">
        <price amount="597.91" currency="EUR" minCommissionablePrice="" />
        <provider>FlightsDemo</provider>
        <searchRequest>
          <dates>
            <departure>2014-11-23</departure>
            <departureReturn>2014-11-26</departureReturn>
          </dates>
          <terminals>
            <origin>AMS</origin>
            <destination>JFK</destination>
          </terminals>
        </searchRequest>
        <outbound>
          <connection id="0">
            <info travelTime="PT11H55M" />
            <segment>
              <info technicalStops="0" />
              <flightNumber>737</flightNumber>
              <carrierCode>LX</carrierCode>
              <class>Economy</class>
              <freeBaggage unit="PC">1</freeBaggage>
              <departure terminal="AMS" date="2014-11-23" time="07:00:00" />
              <arrival terminal="ZRH" date="2014-11-23" time="08:25:00" />
            </segment>
            <segment>
              <info technicalStops="0" />
              <flightNumber>16</flightNumber>
              <carrierCode>LX</carrierCode>
              <class>Economy</class>
              <freeBaggage unit="PC">1</freeBaggage>
              <departure terminal="ZRH" date="2014-11-23" time="09:50:00" />
              <arrival terminal="JFK" date="2014-11-23" time="12:55:00" />
            </segment>
          </connection>
        </outbound>
        <inbound>
          <connection id="0">
            <info travelTime="PT17H" />
            <segment>
              <info technicalStops="0" />
              <flightNumber>88</flightNumber>
              <carrierCode>OS</carrierCode>
              <class>Economy</class>
              <freeBaggage unit="PC">1</freeBaggage>
              <departure terminal="JFK" date="2014-11-26" time="18:00:00" />
              <arrival terminal="VIE" date="2014-11-27" time="08:25:00" />
            </segment>
            <segment>
              <info technicalStops="0" />
              <flightNumber>373</flightNumber>
              <carrierCode>OS</carrierCode>
              <class>Economy</class>
              <freeBaggage unit="PC">1</freeBaggage>
              <departure terminal="VIE" date="2014-11-27" time="15:05:00" />
              <arrival terminal="AMS" date="2014-11-27" time="17:00:00" />
            </segment>
          </connection>
        </inbound>
      </flight>
      <car sessionId="dv.59144724511107" resultid="dv.7498472541" onrequest="0" billable="1" pickupStationId="2321" dropOffStationId="2321" transmission="manual" doors="0" maxPassengers="4" luggageLarge="0" luggageSmall="2" airConditionIndication="1">
        <price amount="21" currency="EUR" />
        <provider>DemoCarsProvider</provider>
        <destinations>
          <destination type="pickUp" stationId="2321" date="2014-10-23" time="12:00" />
          <destination type="dropOff" stationId="2321" date="2014-10-24" time="12:00" />
        </destinations>
        <carName><![CDATA[Fiat 500 Mini 4 Dr]]></carName>
        <carCompany><![CDATA[Easi Rent]]></carCompany>
        <image><![CDATA[http://www.example.com/images/car/fiat-500.jpg]]></image>
        <type><![CDATA[]]></type>
        <class><![CDATA[Other]]></class>
        <features />
      </car>
    </package>
    <package type="advancedResults">
      <hotel id="81311" sessionId="dv.5914472453107">
        <room resultid="dv.7475472461024" onrequest="0" billable="0" minquantity="1" maxquantity="1">
          <price amount="455.48" currency="USD" />
          <provider>HotelsDemo3</provider>
          <name><![CDATA[Standard Double]]></name>
          <board code="AI"><![CDATA[All Inclusive]]></board>
          <pax>
            <adults>2</adults>
          </pax>
        </room>
        <room resultid="dv.7477472461022" onrequest="1" billable="1" minquantity="1" maxquantity="1">
          <price amount="26.19" currency="USD" />
          <provider>HotelsDemo2</provider>
          <name><![CDATA[Standard Twin]]></name>
          <board code="FB"><![CDATA[Full Board]]></board>
          <pax>
            <adults>2</adults>
          </pax>
        </room>
      </hotel>
      <hotel id="32591" sessionId="dv.5914472455107">
        <room resultid="dv.7473472462197" onrequest="0" billable="0" minquantity="1" maxquantity="1">
          <price amount="383.82" currency="USD" />
          <provider>HotelsDemo3</provider>
          <name><![CDATA[Standard Double]]></name>
          <board code="FB"><![CDATA[Full Board]]></board>
          <pax>
            <adults>2</adults>
          </pax>
        </room>
        <room resultid="dv.7474472462197" onrequest="1" billable="1" minquantity="1" maxquantity="1">
          <price amount="17.74" currency="USD" />
          <provider>HotelsDemo2</provider>
          <name><![CDATA[Standard Twin]]></name>
          <board code="RO"><![CDATA[Room Only]]></board>
          <pax>
            <adults>2</adults>
          </pax>
        </room>
      </hotel>
      <transfers sessionId="dv.5914472457107">
        <transfer resultid="dv.7484472524" onrequest="0" billable="1" type="arrival">
          <price amount="102.980" currency="USD" />
          <provider>TransfersDemo9</provider>
          <vehicleType><![CDATA[Sedan with meet and greet Spanish]]></vehicleType>
          <transferType><![CDATA[Private with meet and greet Spanish]]></transferType>
          <origin type="terminal" id="1720">
            <locationName><![CDATA[New York, John F. Kennedy International Airport]]></locationName>
            <locationInfo>
              <name><![CDATA[John F Kennedy International Airport]]></name>
              <city><![CDATA[New York]]></city>
              <state><![CDATA[New York]]></state>
              <country><![CDATA[United States]]></country>
              <latitude>40.639751</latitude>
              <longitude>-73.778925</longitude>
            </locationInfo>
          </origin>
          <destination type="hotel" id="5500">
            <locationName><![CDATA[Manhattan Area Hotels]]></locationName>
            <locationInfo>
              <name><![CDATA[Hilton New York]]></name>
              <address><![CDATA[1335 AVENUE OF THE AMERICAS,, New York, United States]]></address>
              <latitude>40.7622</latitude>
              <longitude>-73.9788</longitude>
            </locationInfo>
          </destination>
          <images>
            <image>http://www.example.com/transfers/car.png</image>
          </images>
        </transfer>
        <transfer resultid="dv.74844725217" onrequest="0" billable="1" type="return">
          <price amount="102.980" currency="USD" />
          <provider>TransfersDemo9</provider>
          <vehicleType><![CDATA[Sedan with meet and greet Spanish]]></vehicleType>
          <transferType><![CDATA[Private with meet and greet Spanish]]></transferType>
          <origin type="hotel" id="5500">
            <locationName><![CDATA[Manhattan Area Hotels]]></locationName>
            <locationInfo>
              <name><![CDATA[Hilton New York]]></name>
              <address><![CDATA[1335 AVENUE OF THE AMERICAS,, New York, United States]]></address>
              <latitude>40.7622</latitude>
              <longitude>-73.9788</longitude>
            </locationInfo>
          </origin>
          <destination type="terminal" id="1720">
            <locationName><![CDATA[New York, John F. Kennedy International Airport]]></locationName>
            <locationInfo>
              <name><![CDATA[John F Kennedy International Airport]]></name>
              <city><![CDATA[New York]]></city>
              <state><![CDATA[New York]]></state>
              <country><![CDATA[United States]]></country>
              <latitude>40.639751</latitude>
              <longitude>-73.778925</longitude>
            </locationInfo>
          </destination>
          <images>
            <image>http://www.example.com/transfers/car.png</image>
          </images>
        </transfer>
      </transfers>
      <flight sessionId="dv.5914472459107" resultid="dv.7501472581" onrequest="0" billable="1">
        <price amount="597.91" currency="EUR" minCommissionablePrice="" />
        <provider>FlightsDemo4</provider>
        <outbound>
          <connection id="0">
            <info travelTime="PT11H55M" />
            <segment>
              <info technicalStops="0" />
              <flightNumber>737</flightNumber>
              <carrierCode>LX</carrierCode>
              <class>Economy</class>
              <freeBaggage unit="PC">1</freeBaggage>
              <departure terminal="AMS" date="2014-11-23" time="07:00:00" />
              <arrival terminal="ZRH" date="2014-11-23" time="08:25:00" />
            </segment>
            <segment>
              <info technicalStops="0" />
              <flightNumber>16</flightNumber>
              <carrierCode>LX</carrierCode>
              <class>Economy</class>
              <freeBaggage unit="PC">1</freeBaggage>
              <departure terminal="ZRH" date="2014-11-23" time="09:50:00" />
              <arrival terminal="JFK" date="2014-11-23" time="12:55:00" />
            </segment>
          </connection>
        </outbound>
        <inbound>
          <connection id="0">
            <info travelTime="PT17H" />
            <segment>
              <info technicalStops="0" />
              <flightNumber>88</flightNumber>
              <carrierCode>OS</carrierCode>
              <class>Economy</class>
              <freeBaggage unit="PC">1</freeBaggage>
              <departure terminal="JFK" date="2014-11-26" time="18:00:00" />
              <arrival terminal="VIE" date="2014-11-27" time="08:25:00" />
            </segment>
            <segment>
              <info technicalStops="0" />
              <flightNumber>373</flightNumber>
              <carrierCode>OS</carrierCode>
              <class>Economy</class>
              <freeBaggage unit="PC">1</freeBaggage>
              <departure terminal="VIE" date="2014-11-27" time="15:05:00" />
              <arrival terminal="AMS" date="2014-11-27" time="17:00:00" />
            </segment>
          </connection>
        </inbound>
      </flight>
      <car sessionId="dv.59144724511107" resultid="dv.749847254115" onrequest="0" billable="1" pickupStationId="5789" dropOffStationId="5789" transmission="auto" doors="0" maxPassengers="5" luggageLarge="2" luggageSmall="3" airConditionIndication="1">
        <price amount="154" currency="EUR" />
        <provider>CarsDemoProvider</provider>
        <searchRequest>
          <destinations>
            <destination type="pickUp" stationId="1219" date="2014-10-23" time="12:00" />
            <destination type="dropOff" stationId="1219" date="2014-10-24" time="12:00" />
          </destinations>
        </searchRequest>
        <destinations>
          <destination type="pickUp" stationId="5789" date="2014-10-23" time="12:00" />
          <destination type="dropOff" stationId="5789" date="2014-10-24" time="12:00" />
        </destinations>
        <carName><![CDATA[Mercedes E Class** Luxury 4 Dr. Auto, A/C]]></carName>
        <carCompany><![CDATA[Alamo]]></carCompany>
        <image><![CDATA[http://www.example.com/images/car/MERCEDES-BENZ-E-CLASS.jpg]]></image>
        <type><![CDATA[]]></type>
        <class><![CDATA[Luxury]]></class>
        <features />
      </car>
    </package>
  </packages>
</response>

The package poll returns a few types of packages (under /response/packages/package @type):
1. minResults - the absolute cheapest price available for each service in the package. it may not be the best quality, but the price will be great
2. averageResults - average priced package with reasonable products
3. advancedResults - high quality products (4-5 star hotels only, direct flights only, private transfers, etc.)

To see what each product node means, you can check out each product section on this API documentation.
Under each product response, there is a node called "searchRequest" that tells you which search request this result belongs to. for example if you have a package with 2 hotels, each hotel will have the corresponding search request under it so it will be easier to distinguish between them.

Price calculation

It is not permitted to show the prices of the individual components of the package. The end-user must only see the total price. In order to do that, you will need to go over each product in the package and calculate the price, adding your markup based on the billable rules (your direct providers, if any) or any other consideration.
Again - the end user must NOT see the component prices, only the total price



Comments