The basket prebook is a wrapper to be put around other prebook calls that allows several prebook requests to be made in a single call.
The basket prebook can be used in place of any of the single component prebook calls. For example, booking a single property component can be done either using a property prebook
or using a basket prebook
In this case, these calls are functionally the same.
To book multiple components in one booking, for example to make two property bookings, or to make one property booking and one flight booking, there are two options for prebooking. The first option is to prebook each component individually by making each component prebook call one at a time. The second option is to use the basket prebook request to complete all of the component prebookings in one call. The basket prebook should contain the prebook calls for each of the components being prebooked.
For example, to book a property, a transfer and a flight, you can make any of the below sets of calls to complete the booking. All three booking journeys will complete the same booking.
PropertySearchRequest
PropertyPrebookRequest
FlightSearchRequest
FlightPrebookRequest
TransferSearchRequest
TransferPrebookRequest
CarHireSearchRequest
CarHirePrebookRequest
BasketBookRequest
PropertySearchRequest
FlightSearchRequest
TransferSearchRequest
CarHireSearchRequest
PropertyPrebookRequest
FlightPrebookRequest
TransferPrebookRequest
CarHirePrebookRequest
BasketBookRequest
PropertySearchRequest
FlightSearchRequest
TransferSearchRequest
CarHireSearchRequest
BasketPrebookRequest (containing the property, transfer and flight prebook requests)
BasketBookRequest
So the basket prebook replaces all other prebooks used in the booking journey.
The basket prebook request includes
lead customer contact details,Â
a summarised version of the details of each guest on the booking, and
component prebook requests for each of the components being prebooked.
Each prebook must contain at least the minimum details required for that component prebook.
The structure of this XML will be the following
The prebook response returned will include the return status (included in every response) to give basic information about whether the call was successful, along with the price of the rooms prebooked, any prices of cancelling the booking and the date that the booking must be cancelled before for that price to be valid and any auto generated booking comments. The XML structure of the response is given below.
If a prebook was successful the return status will be <Success>true</Success>. If the prebook was unsuccessful, the prebook response will give a return status of <Success>false</Success> and list any exceptions that explain why the prebook failed.
At this point, the user can drop out of the booking process if they do not wish to go ahead and book, or move on to the book stage to make the booking. As no reservations have been made at the prebook stage, no further action is required if you choose to leave the booking process at this point.
The user decides to book double deluxe room in the hotel and sends the following prebook request.
<BasketPreBookRequest>
<LoginDetails>
<Login>TestLogin</Login>
<Password>TestPassword</Password>
</LoginDetails>
<PropertyBookings>
<PropertyPrebookRequest>
<BookingToken>77XHIv7Wgmh5VXW2Svh0698bMp8lK3O/0x1AJZI4a3A=</BookingToken>
<ArrivalDate>2013-09-24</ArrivalDate>
<Duration>7</Duration>
<RoomBookings>
<RoomBooking>
<RoomBookingToken>...</RoomBookingToken>
<GuestConfiguration>
<Adults>2</Adults>
<Children>0</Children>
<Infants>0</Infants>
</GuestConfiguration>
</RoomBooking>
</RoomBookings>
</PropertyPrebookRequest>
</PropertyBookings>
</BasketPreBookRequest>
The response will look as follows.
<BasketPreBookResponse>
<ReturnStatus>
<Success>true</Success>
<Exceptions/>
</ReturnStatus>
<TotalPrice>280</TotalPrice>
<TotalCommission>0</TotalCommission>
<VATOnCommission>0</VATOnCommission>
<PropertyBookings>
<PropertyPreBookResponse>
<BookingToken>77XHIv7J0=</BookingToken>
<TotalPrice>280</TotalPrice>
<TotalCommission>0</TotalCommission>
<VATOnCommission>0</VATOnCommission>
<Cancellations>
<Cancellation>
<StartDate>2013-08-06T00:00:00</StartDate>
<EndDate>2013-08-12T00:00:00</EndDate>
<Amount>55.35</Amount>
</Cancellation>
<Cancellation>
<StartDate>2013-08-13T00:00:00</StartDate>
<EndDate>2013-08-26T00:00:00</EndDate>
<Amount>129.15</Amount>
</Cancellation>
<Cancellation>
<StartDate>2013-08-27T00:00:00</StartDate>
<EndDate>2013-09-02T00:00:00</EndDate>
<Amount>147.6</Amount>
</Cancellation>
<Cancellation>
<StartDate>2013-09-03T00:00:00</StartDate>
<EndDate>2013-09-09T00:00:00</EndDate>
<Amount>184.5</Amount>
</Cancellation>
<Cancellation>
<StartDate>2013-09-10T00:00:00</StartDate>
<EndDate>2013-09-18T00:00:00</EndDate>
<Amount>280.00</Amount>
</Cancellation>
</Cancellations>
<PaymentsDue>
<PaymentDue>
<Amount>280.00</Amount>
<DateDue>2013-08-06T00:00:00</DateDue>
</PaymentDue>
</PaymentsDue>
<Errata />
<Comments/>
</PropertyPreBookResponse>
</PropertyBookings>
</BasketPreBookResponse>