Version 3 PHP Availability Request


<?PHP
//use latest minorRev 14
$url='http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=[use most current]';
$url .= '&apiKey=XXX';
$url .= '&cid=55505';
$url .= '&locale=en_US&city=Dallas&stateProvinceCode=TX&countryCode=US&numberOfResults=3';
$url .= '&searchRadius=50';
//using the cache returns results much faster
$url .= '&supplierCacheTolerance=MED_ENHANCED';
//dates and occupancy
$url .='&arrivalDate=09/04/2012&departureDate=09/05/2012&room1=2';
$header[] = "Accept: application/json";
$header[] = "Accept-Encoding: gzip";
$ch = curl_init();
curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
curl_setopt($ch,CURLOPT_ENCODING , "gzip");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$response = json_decode(curl_exec($ch));
//$response = curl_exec($ch);
?>
<html>
<body>
<table>
 <Tr>
 <TD><?PHP
//for ($x=0; $x <=9; $x++)
//{
print_r($url);
print_r("<BR>");
print_r("<pre>");
print_r ($response);
print_r("</pre>");
//}
?>
</TD>
</Tr>
</table>
</body>
</html>
 
OUTPUT:

http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=XX&apiKey=xxx&cid=#####&locale=en_US&city=Dallas&stateProvinceCode=TX&countryCode=US&numberOfResults=10&searchRadius=50&supplierCacheTolerance=MED_ENHANCED&arrivalDate=09/04/2012&departureDate=09/05/2012&room1=2

stdClass Object
(
[HotelListResponse] => stdClass Object
(
[customerSessionId] => 0ABAA856-70E4-C913-6F52-DC51409044EA
[numberOfRoomsRequested] => 1
[moreResultsAvailable] => 1
[cacheKey] => -3570e4c:136f5dc5140:-44e8
[cacheLocation] => 10.186.168.86:7301
[cachedSupplierResponse] => stdClass Object
(
[@matchedLocale] => true
[@matchedCurrency] => true
[@tpidUsed] => 5001
[@otherOverheadTime] => 5
[@candidatePreptime] => 227
[@supplierResponseTime] => 611
[@supplierResponseNum] => 10
[@supplierRequestNum] => 466
[@cachedTime] => 0
[@supplierCacheTolerance] => MED_ENHANCED
)

[HotelList] => stdClass Object
(
[@activePropertyCount] => 499
[@size] => 3
[HotelSummary] => Array
(
[0] => stdClass Object
(
[@ubsScore] => 3155
[@order] => 0
[hotelId] => 122878
[name] => Adolphus Hotel
[address1] => 1321 Commerce Street
[city] => Dallas
[stateProvinceCode] => TX
[postalCode] => 75202
[countryCode] => US
[airportCode] => DFW
[supplierType] => E
[propertyCategory] => 1
[hotelRating] => 4
[confidenceRating] => 90
[amenityMask] => 4161858
[locationDescription] => Near Dallas World Aquarium
[shortDescription] =>
 
<p><b>Location. </b> <br />Adolphus Hotel is located in central Dallas, close to Renaissance Tower, Dallas World Aquarium, and Sixth Floor Museum. Nearby points of interest also include Morton H.
[highRate] => 219
[lowRate] => 175.2
[rateCurrencyCode] => USD
[latitude] => 32.77973
[longitude] => -96.80038
[proximityDistance] => 5.502136
[proximityUnit] => MI
[hotelInDestination] => 1
[thumbNailUrl] => /hotels/1000000/30000/21000/20941/20941_43_t.jpg
[deepLink] => http://travel.ian.com/index.jsp?pageName=hotAvail&cid=379859&hotelID=122878&mode=2&numberOfRooms=1&room-0-adult-total=2&room-0-child-total=0&arrivalMonth=8&arrivalDay=4&departureMonth=8&departureDay=5&showInfo=true&locale=en_US
[RoomRateDetailsList] => stdClass Object
(
[RoomRateDetails] => stdClass Object
(
[roomTypeCode] => 349367
[rateCode] => 200144149
[maxRoomOccupancy] => 4
[quotedRoomOccupancy] => 2
[minGuestAge] => 0
[roomDescription] => Executive Suite - Advance Purchase
[promoId] => 200795385
[promoDescription] => 21-Day Advance Purchase Special
[currentAllotment] => 15
[propertyAvailable] => 1
[propertyRestricted] => 
[expediaPropertyId] => 20941
[rateKey] => 6ad227a0-a624-46c1-a0a3-fa4f394ec8f4
[nonRefundable] => 1
[RateInfos] => stdClass Object
(
[@size] => 1
[RateInfo] => stdClass Object
(
[@rateChange] => false
[@promo] => true
[@priceBreakdown] => true
[RoomGroup] => stdClass Object
(
[Room] => stdClass Object
(
[numberOfAdults] => 2
[numberOfChildren] => 0
)
)

[ChargeableRateInfo] => stdClass Object
(
[@total] => 201.92
[@surchargeTotal] => 26.72
[@nightlyRateTotal] => 175.2
[@maxNightlyRate] => 175.2
[@currencyCode] => USD
[@commissionableUsdTotal] => 175.2
[@averageRate] => 175.2
[@averageBaseRate] => 219.0
[NightlyRatesPerRoom] => stdClass Object
(
[@size] => 1
[NightlyRate] => stdClass Object
(
[@promo] => true
[@rate] => 175.2
[@baseRate] => 219.0
)
)

[Surcharges] => stdClass Object
(
[@size] => 1
[Surcharge] => stdClass Object
(
[@amount] => 26.72
[@type] => TaxAndServiceFee
)
)
)
)
)

[ValueAdds] => stdClass Object
(
[@size] => 1
[ValueAdd] => stdClass Object
(
[@id] => 2048
[description] => Free Wireless Internet
)
)
)
)
)

[1] => stdClass Object
(
[@ubsScore] => 3000
[@order] => 1
[hotelId] => 150511
[name] => Magnolia Hotel Dallas
[address1] => 1401 Commerce St
[city] => Dallas
[stateProvinceCode] => TX
[postalCode] => 75201
[countryCode] => US
[airportCode] => DFW
[supplierType] => E
[propertyCategory] => 1
[hotelRating] => 3.5
[confidenceRating] => 95
[amenityMask] => 8364290
[locationDescription] => Near Dallas World Aquarium
[shortDescription] => <p><b>Location. </b> <br />Located in central Dallas, Magnolia Hotel Dallas is near the airport and within walking distance of Renaissance Tower, J. Erik Jonsson Central Library, and Dallas City
[highRate] => 179
[lowRate] => 161.1
[rateCurrencyCode] => USD
[latitude] => 32.77997
[longitude] => -96.79928
[proximityDistance] => 5.485768
[proximityUnit] => MI
[hotelInDestination] => 1
[thumbNailUrl] => /hotels/1000000/290000/282400/282336/282336_13_t.jpg
[deepLink] => http://travel.ian.com/index.jsp?pageName=hotAvail&cid=379859&hotelID=150511&mode=2&numberOfRooms=1&room-0-adult-total=2&room-0-child-total=0&arrivalMonth=8&arrivalDay=4&departureMonth=8&departureDay=5&showInfo=true&locale=en_US
[RoomRateDetailsList] => stdClass Object
(
[RoomRateDetails] => stdClass Object
(
[roomTypeCode] => 7672
[rateCode] => 1098646
[maxRoomOccupancy] => 3
[quotedRoomOccupancy] => 2
[minGuestAge] => 0
[roomDescription] => Deluxe Room - One Queen - Non-Refundable
[promoId] => 2961735
[promoDescription] => 7-Day Advance Purchase Special (Nonrefundable)
[currentAllotment] => 10
[propertyAvailable] => 1
[propertyRestricted] => 
[expediaPropertyId] => 282336
[rateKey] => 6ad227a0-a624-46c1-a0a3-fa4f394ec8f4
[nonRefundable] => 1
[RateInfos] => stdClass Object
(
[@size] => 1
[RateInfo] => stdClass Object
(
[@rateChange] => false
[@promo] => true
[@priceBreakdown] => true
[RoomGroup] => stdClass Object
(
[Room] => stdClass Object
(
[numberOfAdults] => 2
[numberOfChildren] => 0
)
)

[ChargeableRateInfo] => stdClass Object
(
[@total] => 188.08
[@surchargeTotal] => 26.98
[@nightlyRateTotal] => 161.1
[@maxNightlyRate] => 161.1
[@currencyCode] => USD
[@commissionableUsdTotal] => 161.1
[@averageRate] => 161.1
[@averageBaseRate] => 179.0
[NightlyRatesPerRoom] => stdClass Object
(
[@size] => 1
[NightlyRate] => stdClass Object
(
[@promo] => true
[@rate] => 161.1
[@baseRate] => 179.0
)
)

[Surcharges] => stdClass Object
(
[@size] => 1
[Surcharge] => stdClass Object
(
[@amount] => 26.98
[@type] => TaxAndServiceFee
)
)
)
)
)

[ValueAdds] => stdClass Object
(
[@size] => 2
[ValueAdd] => Array
(
[0] => stdClass Object
(
[@id] => 2048
[description] => Free Wireless Internet
)

[1] => stdClass Object
(
[@id] => 16777216
[description] => Breakfast Buffet
)
)
)
)
)
)

[2] => stdClass Object
(
[@ubsScore] => 1944
[@order] => 2
[hotelId] => 110839
[name] => Hotel Lawrence
[address1] => 302 S Houston Street
[city] => Dallas
[stateProvinceCode] => TX
[postalCode] => 75202
[countryCode] => US
[airportCode] => DFW
[supplierType] => E
[propertyCategory] => 1
[hotelRating] => 3
[confidenceRating] => 90
[amenityMask] => 7831627
[locationDescription] => Near Sixth Floor Museum
[shortDescription] => <p><b>Location. </b> <br />Located in central Dallas, Hotel Lawrence is within walking distance of Old Red Courthouse and Sixth Floor Museum. Nearby points of interest also include Dallas World
[highRate] => 139
[lowRate] => 125.1
[rateCurrencyCode] => USD
[latitude] => 32.77711
[longitude] => -96.80719
[proximityDistance] => 5.6993628
[proximityUnit] => MI
[hotelInDestination] => 1
[thumbNailUrl] => /hotels/1000000/800000/794600/794528/794528_24_t.jpg
[deepLink] => http://travel.ian.com/index.jsp?pageName=hotAvail&cid=379859&hotelID=110839&mode=2&numberOfRooms=1&room-0-adult-total=2&room-0-child-total=0&arrivalMonth=8&arrivalDay=4&departureMonth=8&departureDay=5&showInfo=true&locale=en_US
[RoomRateDetailsList] => stdClass Object
(
[RoomRateDetails] => stdClass Object
(
[roomTypeCode] => 4789
[rateCode] => 4789
[maxRoomOccupancy] => 2
[quotedRoomOccupancy] => 2
[minGuestAge] => 0
[roomDescription] => 1 Queen Bed w/Cont. Breakfast
[promoId] => 200370377
[promoDescription] => Sale! Save 10% on this Stay.
[currentAllotment] => 9
[propertyAvailable] => 1
[propertyRestricted] => 
[expediaPropertyId] => 794528
[rateKey] => 6ad227a0-a624-46c1-a0a3-fa4f394ec8f4
[nonRefundable] => 
[RateInfos] => stdClass Object
(
[@size] => 1
[RateInfo] => stdClass Object
(
[@rateChange] => false
[@promo] => true
[@priceBreakdown] => true
[RoomGroup] => stdClass Object
(
[Room] => stdClass Object
(
[numberOfAdults] => 2
[numberOfChildren] => 0
)
)

[ChargeableRateInfo] => stdClass Object
(
[@total] => 144.18
[@surchargeTotal] => 19.08
[@nightlyRateTotal] => 125.1
[@maxNightlyRate] => 125.1
[@currencyCode] => USD
[@commissionableUsdTotal] => 125.1
[@averageRate] => 125.1
[@averageBaseRate] => 139.0
[NightlyRatesPerRoom] => stdClass Object
(
[@size] => 1
[NightlyRate] => stdClass Object
(
[@promo] => true
[@rate] => 125.1
[@baseRate] => 139.0
)
)

[Surcharges] => stdClass Object
(
[@size] => 1
[Surcharge] => stdClass Object
(
[@amount] => 19.08
[@type] => TaxAndServiceFee
)
)
)
)
)

[ValueAdds] => stdClass Object
(
[@size] => 2
[ValueAdd] => Array
(
[0] => stdClass Object
(
[@id] => 2
[description] => Continental Breakfast
)

[1] => stdClass Object
(
[@id] => 1024
[description] => Free High-Speed Internet
)
)
)
)
)
)
 )
)
)
)