Note that the API paths has been changed to be a bit more RESTfull.Valid appId is mandatory. You can use the appId from examples for testing (when we go to production we will provision new appId).To receive json pass application/json in the header (by default response is xml). You can do it in curl like this:

curl -i -H "Accept: application/json" "http://d.2ya.it/dre/api/rest/search/hotels?&appId={AppID}&page=1&pageSize=10&latitude=43.79618&longitude=-79.495094&units=km&radius=50.0&deviceType=iOSDevice&clientVersion=2.0.2&model=iPhone3,1&userid=C4C2EC09-E151-4DCD-9A97-884CAFD8F6E7&co=CA"

Paging & Number of results

For all of the following APIs, you can add parameters

page={Positive integer}

(default is 1, The starting page for the search result.)

pageSize={Positive integer}

(default is 10, The desired number of each call)

 

Additional Parameters:

 

sortBy = {distance_ascending, ranking_ascending, price_ascending, distance_descending, ranking_descending, price_descending}  (default is distance_ascending)

arrival_date={yyyy-mm-dd}  (optional)

departure_date={yyyy-mm-dd}   (optional)

co={country code}

 

Search hotel nearby:

 

Search for Toronto:

http://d.2ya.it/dre/api/rest/search/hotels?sortBy=distance_ascending&appId={AppID}&page=1&pageSize=10&latitude=43.79618&longitude=-79.495094&units=km&radius=50.0&deviceType=iOSDevice&clientVersion=2.0.2&model=iPhone3,1&userid=C4C2EC09-E151-4DCD-9A97-884CAFD8F6E7&co=CA

<hotelSearch>

<hotel>

<id>bo–236362–</id>
<providerid>236362</providerid>
<num>1</num>
<id>{“partnerClickIds”:[{"extraDataFields":null,"partnerId":"41","clickThruTypeIdsToProcess":null,"partnerProvidedListingId":"76328"}],”sectionId”:”15″,”internalDatabaseId”:”76328″}</id>
<name>Moda Hotel</name>
<street>900 Seymour Street</street>
<city>Vancouver</city>
<city_id>-575268</city_id>
<postal>V6B 3L9</postal>
<countrycode>ca</countrycode>
<review_score>7.8</review_score>
<review_nr>302</review_nr>
<latitude>49.27948885860674</latitude>
<longitude>-123.12050499022007</longitude>
<ranking>134</ranking>
<hoteltype_id>Hotel</hoteltype_id>
<pagename>67</pagename>
<isClickThru>false</isClickThru>
<nr_rooms>67</nr_rooms>
<minrate>143.65</minrate>
<maxrate>239</maxrate>
<max_rooms_in_reservation>0</max_rooms_in_reservation>
<max_persons_in_reservation>0</max_persons_in_reservation>
<preferred>1</preferred>
<class_is_estimated>0</class_is_estimated>
<exact_class>m-vancouver-british-columbia</exact_class>
<currencycode>CAD</currencycode>
<languagecode>en</languagecode>
<checkinFrom>15:00</checkinFrom>
<checkoutTo>11:00</checkoutTo>
<max_price>0.0</max_price>
<max_total_price>0.0</max_total_price>
<min_price>0.0</min_price>
<min_total_price>0.0</min_total_price>
<available_rooms>0</available_rooms>
<distance>0.03</distance>
<website>
<tag>Website</tag>
<url>http://www.booking.com/hotel/ca/m-vancouver-british-columbia.html?aid=390850</url>
</website>
</hotel>

<more>true</more>
<totalPages>2</totalPages>

</hotelSearch>

 

Search hotel nearby with date range:

 

Note: When the date range supplied, the following output fields will have non-zero value .

<max_total_price>, <min_price>, <min_total_price>, <max_price>, <available_rooms>, <arrival_date>, <departure_date>.

 

http://localhost/dre/api/rest/search/hotels?sortBy=distance_descending&arrival_date=2014-08-02&departure_date=2014-08-04&appId=poy3er42-w34r-4fr2-v2eg-3r43guhby57h&query=pizza&page=1&n=10&latitude=43.79618&longitude=-79.495094&units=km&radius=50.0&provider=gp&deviceType=iOSDevice&clientVersion=2.0.2&model=iPhone3,1&userid=C4C2EC09-E151-4DCD-9A97-884CAFD8F6E7&co=CA

<hotelSearch>
<hotel>

<id>bo–236362–</id>
<providerid>236362</providerid>
<name>Alderwood Farm Cozy Cottage</name>
<street>1351 Adams Road</street>
<city>Bowen Island</city>
<city_id>900048888</city_id>
<postal>V0N 1G2</postal>
<countrycode>ca</countrycode>
<review_score>9.6</review_score>
<review_nr>5</review_nr>
<latitude>49.358253739485114</latitude>
<longitude>-123.39710497859414</longitude>
<ranking>1</ranking>
<hoteltype_id>Bed and Breakfast</hoteltype_id>
<pagename>1</pagename>
<isClickThru>false</isClickThru>
<nr_rooms>1</nr_rooms>
<minrate>127.5</minrate>
<maxrate>148.75</maxrate>
<max_rooms_in_reservation>0</max_rooms_in_reservation>
<max_persons_in_reservation>0</max_persons_in_reservation>
<preferred>0</preferred>
<class_is_estimated>0</class_is_estimated>
<exact_class>alderwood-farm-cozy-cottage</exact_class>
<currencycode>CAD</currencycode>
<languagecode>en</languagecode>
<checkinFrom>15:00</checkinFrom>
<checkoutTo>11:00</checkoutTo>
<max_price>127.5</max_price>
<max_total_price>382.5</max_total_price>
<min_price>127.5</min_price>
<min_total_price>382.5</min_total_price>
<available_rooms>1</available_rooms>
<arrival_date>2014-08-13</arrival_date>
<departure_date>2014-08-16</departure_date>
<distance>21.86</distance>
<website>
<tag>Website</tag>
<url>http://www.booking.com/hotel/ca/alderwood-farm-cozy-cottage.html?aid=390850&amp;dcid=1&amp;lang=en-gb&amp;checkin_monthday=13&amp;checkin_year_month=2014-8&amp;checkout_monthday16&amp;checkout_year_month=2014-8</url>
</website>

</hotel>

<more>true</more>
<totalPages>2</totalPages>

</hotelSearch>

Get hotel by Id:

 

Get parking by Id:

Additional parameter id={id}

 

(For example, id=bo_38489)

http://d.2ya.it/dre/api/rest/search/hotels?id=bo_38489&appId={AppID}&latitude=43.79618&longitude=-79.495094&units=km&radius=50.0&deviceType=iOSDevice&clientVersion=2.0.2&model=iPhone3,1&userid=C4C2EC09-E151-4DCD-9A97-884CAFD8F6E7&co=CA