In order to use the version 1.1 of the OTA interface, change the value of the Version attribute in the OTA_HotelAvailRQ root element (see example below)
For the REST API, specify the version 1.1 in the URL (see example below)
The request can now contain more than one "GuestCount" element. For each "GuestCount" element, either the "Age" or "AgeQualifyingCode" attribute has to be defined.
The accepted "AgeQualifyingCode" values are:
AQC | Description |
---|---|
7 | Infant |
8 | Child |
10 | Adult |
The "Age" attribute is an integer specifying the guest(s) age.
Both attributes cannot be used at the same time.
<?xml version="1.0" encoding="utf-8"?> <OTA_HotelAvailRQ Version="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" EchoToken="ECHOTOKEN" TimeStamp="2015-09-08T13:06:46.0743525+00:00" Target="Test" TransactionIdentifier="TRANSACTIONIDENTIFIER" PrimaryLangID="en" AltLangID="en" xmlns="http://www.opentravel.org/OTA/2003/05"> <POS> <Source> <RequestorID ID="YOURUSERNAME" MessagePassword="YOURPASSWORD" Type="13"/> </Source> </POS> <AvailRequestSegments> <AvailRequestSegment> <HotelSearchCriteria BestOnlyIndicator="false"> <Criterion> <HotelRef HotelCode="YOURHOTELCODE" HotelCodeContext="HotelSpider" /> <StayDateRange Start="ARRIVALDATE" End="DEPARTUREDATE" /> <RoomStayCandidates> <RoomStayCandidate> <GuestCounts> <GuestCount Count="GUESTCOUNT" AgeQualifyingCode="10" /> <!-- number of adults --> <GuestCount Count="GUESTCOUNT" AgeQualifyingCode="8" /> <!-- number of children --> <GuestCount Count="GUESTCOUNT" AgeQualifyingCode="7" /> <!-- number of infants --> </GuestCounts> </RoomStayCandidate> </RoomStayCandidates> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ> |
Another example, specifying the age of the children:
<GuestCounts> <GuestCount Count="2" AgeQualifyingCode="10" /> <!-- 2 adults --> <GuestCount Count="1" Age="8" /> <GuestCount Count="1" Age="4" /> <GuestCount Count="1" Age="0" /> <!-- a baby whose age is less than a year --> </GuestCounts> |
The version has to be specified in the URL like this: https://extranet.hotel-spider.ch/crs/v1.1/availabilities
For the three requests "availabilities", "bestavailabilities" and "bestrates":
Examples:
https://extranet.hotel-spider.ch/crs/v1.1/availabilities?hotels=ABCD&start=2017-12-15&end=2017-12-17&nbAdults=2&nbChildren=0&apiKey=xxxx (two adults and no child)
https://extranet.hotel-spider.ch/crs/v1.1/availabilities?hotels=ABCD&start=2017-12-15&end=2017-12-17&nbAdults=2&nbChildren=1&apiKey=xxxx (two adults and one child with no age specified)
https://extranet.hotel-spider.ch/crs/v1.1/availabilities?hotels=ABCD&start=2017-12-15&end=2017-12-17&nbAdults=2&nbChildren=1&childrenAges=12&apiKey=xxxx (two adults and one 12 years old child)
https://extranet.hotel-spider.ch/crs/v1.1/availabilities?hotels=ABCD&start=2017-12-15&end=2017-12-17&nbAdults=2&nbChildren=3&childrenAges=8,4,0&apiKey=xxxx (same parameters as in the OTA example above)