3. Book

The package booking request if very similar to the individual products booking request, all grouped together:
<?xml version="1.0"?>
<request version="4.0">
  <auth>
    <username>example</username>
    <password>example</password>
    <agent>example</agent>
  </auth>
  <packages-book session="dv.2831934821140" clientRef="667389619891" cancelOnFailure="refundable">
    <customer>
      <title>M</title>
      <firstName>Flugle</firstName>
      <lastName>McMunster</lastName>
      <age>30</age>
      <phone type="home">123-45678</phone>
      <phone type="mobile">123-456789</phone>
      <email>flugle@example.com</email>
      <address>123 Olendorf st.</address>
      <postCode>70906</postCode>
      <city>Neumunster</city>
      <countryCode>DE</countryCode>
    </customer>
    <hotel-book session="dv.27979370823118">
      <rooms>
        <room resultId="dv.2983337082129">
          <pax-group>
            <pax>
              <title>F</title>
              <firstName><![CDATA[Flugle]]></firstName>
              <lastName><![CDATA[McMunster]]></lastName>
              <age><![CDATA[33]]></age>
            </pax>
            <pax>
              <title>F</title>
              <firstName><![CDATA[Gretl]]></firstName>
              <lastName><![CDATA[McMunster]]></lastName>
              <age><![CDATA[35]]></age>
            </pax>
          </pax-group>
        </room>
      </rooms>
    </hotel-book>
    <hotel-book session="dv.27979370825118">
      <rooms>
        <room resultId="dv.29856370821134">
          <pax-group>
            <pax>
              <title>F</title>
              <firstName><![CDATA[Flugle]]></firstName>
              <lastName><![CDATA[McMunster]]></lastName>
              <age><![CDATA[33]]></age>
            </pax>
            <pax>
              <title>F</title>
              <firstName><![CDATA[Gretl]]></firstName>
              <lastName><![CDATA[McMunster]]></lastName>
              <age><![CDATA[33]]></age>
            </pax>
          </pax-group>
        </room>
      </rooms>
    </hotel-book>
    <transfers-book session="dv.27979370827118">
      <flightNumber arrival="BA2491A" departure="BA2491B" />
      <results>
        <result token="dv.298553708314" />
        <result token="dv.298553708328" />
      </results>
    </transfers-book>
    <cars-book session="dv.279793708211118" carProgramToken="dv.279483735012" />
    <flights-book session="dv.27979370829118">
      <result token="dv.29857370931">
        <connections>
          <outbound id="0" />
          <inbound id="1" />
        </connections>
        <pax-group>
          <pax>
            <title>M</title>
            <firstName>Flugle</firstName>
            <lastName>McMunster</lastName>
            <dateOfBirth>1982-01-01</dateOfBirth>
          </pax>
          <pax>
            <title>F</title>
            <firstName>Gretl</firstName>
            <lastName>McMunster</lastName>
            <dateOfBirth>1980-01-01</dateOfBirth>
          </pax>
        </pax-group>
      </result>
    </flights-book>
  </packages-book>
</request>
 Parameter Type Comments
packages-book @sessionstringthe response @session from the package-search response
packages-book @clientRefstringyour reference for the package booking
packages-book @cancelOnFailurestringall/none/refundable - see note #1 below
packages-book @continueOnFailurebooleantrue/false (default is false) - see note #2 below
customernode the customer details 
hotel-book/flights-book/cars-book/transfers-booknodethe different booking nodes for each product in the package. in most cases you will only have to send the pax details, but follow the examples and see what is needed for each service
*-book nodes @sessionstring the @session  returned in each product node in the search response

Notes

1. the @cancelOnFailure attribute will determine how cancellations on failures are going to be treated. if the value is set to "none" - nothing will happen. "refundable" means it will try to cancel the "refundable" bookings, and "all" means it will try to cancel all bookings regardless of the cancellation policy. Note that if you choose "all" you will be held accountable for all cancellation charges.
2. the @continueOnFailure attribute will determine whether or not to continue booking even if one service had failed. "true" will book all services regardless of the success in booking the previous elements of the package. "false" will stop on the first encounter with a failure. the default (and recommended) behavior is "false".
3. book node @session attribute is not the session you set in the packages-book @session, but a different one for each product, returned on each product node in the search response

Response
The response is very similar to the individual services booking response, just grouped together in a package.
<?xml version="1.0"?>
<response success="1" session="dv.2831934821140">
  <package status="on request">
    <hotels sessionId="dv.27979370823118">
      <reservation id="dv.28364376891" status="on request" clientReference="667389619891">
        <item token="dv.2983337082129" status="on request" id="1">
          <quantity>1</quantity>
          <name><![CDATA[Classic Twin Room]]></name>
          <board code="AI"><![CDATA[All Inclusive]]></board>
          <remarks><![CDATA[]]></remarks>
          <source provider="HotelsDemo2">
            <reference>REF-egYRgDoHrW</reference>
          </source>
          <booking billable="1" payAtTheHotel="0">
            <price amount="486.46" currency="USD" />
          </booking>
          <cancellation>
            <frame endTime="2014-12-05 00:00:00" timezone="UTC" type="fully-refundable" />
            <frame endTime="2014-12-10 00:00:00" timezone="UTC" type="non-refundable" />
          </cancellation>
          <pax-groups>
            <pax-group quantityItem="0">
              <pax id="0">
                <title><![CDATA[F]]></title>
                <firstName><![CDATA[Flugle]]></firstName>
                <lastName><![CDATA[McMunster]]></lastName>
                <age>33</age>
              </pax>
              <pax id="1">
                <title><![CDATA[F]]></title>
                <firstName><![CDATA[Gretl]]></firstName>
                <lastName><![CDATA[McMunster]]></lastName>
                <age>33</age>
              </pax>
            </pax-group>
          </pax-groups>
        </item>
      </reservation>
    </hotels>
    <hotels sessionId="dv.27979370825118">
      <reservation id="dv.28364376894" status="confirmed" clientReference="667389619891">
        <item token="dv.29856370821134" status="confirmed" id="1">
          <quantity>1</quantity>
          <name><![CDATA[Standard, One Double or Two Twins]]></name>
          <board code="RO"><![CDATA[Room Only]]></board>
          <remarks><![CDATA[]]></remarks>
          <source provider="HotelsDemo3">
            <reference>REF-mtEnC4jRwc</reference>
          </source>
          <booking billable="0" payAtTheHotel="0">
            <price amount="17.7" currency="USD" />
          </booking>
          <cancellation>
            <frame endTime="2014-11-02 00:00:00" timezone="UTC" type="fully-refundable" />
            <frame endTime="2014-12-10 00:00:00" timezone="UTC" type="non-refundable" />
          </cancellation>
          <pax-groups>
            <pax-group quantityItem="0">
              <pax id="0">
                <title><![CDATA[F]]></title>
                <firstName><![CDATA[Flugle]]></firstName>
                <lastName><![CDATA[McMunster]]></lastName>
                <age>33</age>
              </pax>
              <pax id="1">
                <title><![CDATA[F]]></title>
                <firstName><![CDATA[Gretl]]></firstName>
                <lastName><![CDATA[McMunster]]></lastName>
                <age>33</age>
              </pax>
            </pax-group>
          </pax-groups>
        </item>
      </reservation>
    </hotels>
    <transfers sessionId="dv.27979370827118">
      <reservation id="dv.28364376895" status="confirmed" clientReference="667389619891">
        <item status="confirmed" id="1" type="arrival" token="dv.298553708314">
          <serviceDate type="arrival" date="2014-10-30" />
          <source provider="TransferDemo7">
            <reference>254-1037040-T1</reference>
          </source>
          <booking billable="1">
            <price amount="101.680" currency="USD" />
          </booking>
          <remark>
            <![CDATA["AIRPORT TRANSFER
                     *Contact telephone number for provider of the service is 1-800-542-1584 or 1-718-442-4636 available 24 hours
                     *INTERNATIONAL Passengers will be met outside the customs area with passenger name on the sign held by the driver
            ]]>
          </remark>
          <vehicleType>Van with meet and greet Spanish or Portuguese</vehicleType>
          <transferType>Shared with meet and greet Spanish or Portuguese</transferType>
          <customer>
            <title>M</title>
            <firstName>Flugle</firstName>
            <lastName>McMunster</lastName>
            <age>30</age>
          </customer>
          <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>
          <cancellation>
            <frame endTime="2014-10-25 23:59:00" timezone="UTC" type="fully-refundable" />
            <frame endTime="2014-10-30 12:00:00" timezone="UTC" type="partial">
              <cost amount="101.680" currency="USD" />
            </frame>
          </cancellation>
        </item>
        <item status="confirmed" id="2" type="return" token="dv.298553708328">
          <serviceDate type="return" date="2014-10-31" />
          <source provider="TransferDemo7">
            <reference>254-1037041-T1</reference>
          </source>
          <booking billable="1">
            <price amount="101.680" currency="USD" />
          </booking>
          <remark>
            <![CDATA["AIRPORT TRANSFER
                     *Contact telephone number for provider of the service is 1-800-542-1584 or 1-718-442-4636 available 24 hours
                     *INTERNATIONAL Passengers will be met outside the customs area with passenger name on the sign held by the driver
            ]]>
          </remark>
          <vehicleType>Van with meet and greet Spanish or Portuguese</vehicleType>
          <transferType>Shared with meet and greet Spanish or Portuguese</transferType>
          <customer>
            <title>M</title>
            <firstName>Test Firstname a</firstName>
            <lastName>Test Lastname a</lastName>
            <age>30</age>
          </customer>
          <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>
          <cancellation>
            <frame endTime="2014-10-26 23:59:00" timezone="UTC" type="fully-refundable" />
            <frame endTime="2014-10-30 12:00:00" timezone="UTC" type="partial">
              <cost amount="101.680" currency="USD" />
            </frame>
          </cancellation>
        </item>
      </reservation>
    </transfers>
    <cars sessionId="dv.279793708211118">
      <reservation id="dv.28364376896" status="confirmed" clientReference="667389619891">
        <item id="1" status="confirmed" token="">
          <source provider="CarsDemo11">
            <reference>57894837|59055101</reference>
          </source>
          <booking billable="1">
            <price amount="31.76" currency="USD" />
          </booking>
          <stations>
            <station type="pickUp" latitude="51.5112" longitude="-0.119824" pickUpHours="07:00-23:00" dropOffHours="07:00-23:00">
              <name><![CDATA[London Heathrow Airport ]]></name>
              <address><![CDATA[Holiday Inn M4J4, Sipson Road, West Drayton, Middlesex, UB7 0JU      ]]></address>
              <phone>+44 208 122 9265</phone>
            </station>
            <station type="dropOff" latitude="51.5112" longitude="-0.119824" pickUpHours="07:00-23:00" dropOffHours="07:00-23:00">
              <name><![CDATA[London Heathrow Airport ]]></name>
              <address><![CDATA[Holiday Inn M4J4, Sipson Road, West Drayton, Middlesex, UB7 0JU      ]]></address>
              <phone>+44 208 122 9265</phone>
            </station>
          </stations>
          <car-details transmission="manual" airConditionIndication="1" doors="3" maxPassengers="4" luggageLarge="1" luggageSmall="1">
            <carName><![CDATA[Citroen C1 Or Similar]]></carName>
            <carCompany><![CDATA[GreenMotion]]></carCompany>
            <type><![CDATA[Car]]></type>
            <class><![CDATA[Mini]]></class>
          </car-details>
          <additional-components />
          <driver-info>
            <title>M</title>
            <firstName><![CDATA[Flugle]]></firstName>
            <lastName><![CDATA[McMunster]]></lastName>
            <age>30</age>
          </driver-info>
          <cancellation>
            <frame endTime="2014-10-01 00:00:00" timezone="UTC" type="non-refundable" />
          </cancellation>
        </item>
      </reservation>
    </cars>
  </package>
</response>
Parameter Type Comments
package @statusstringthe status of the entire package is for reference only. the real status of each component is set on the reservation node for each service
Notes:
1. It is mandatory to check each service status and not to rely on the package status returned in the booking request in case the status is not "confirmed".

Adding the transaction ID

In case you are using slokly for your processing, you can pass the transaction ids in the booking request under the packages-book node:
<sloklyTransactionIds>
   <sloklyTransactionId>1234</sloklyTransactionId>
</sloklyTransactionIds>
Parameter Type Comments
sloklyTransactionIds/sloklyTransactionIdnodeThe transaction id you want to connect to the booking
Note: In case you have multiple transactions (like authorize, purchase, 3d, etc.) you can simply add more sloklyTransactionId nodes under sloklyTransactionIds

Comments