GET /v2/lodgings/{id}/stays/suggests/{arrival}-{departure}

Returns suggestions which may correspond to stay date and duration. Suggestions are sorted by relevance.

Resource information

Authentication No
Response Formats xml, json
HTTP Method GET
Response Object List of stays
API Version v2

Resource parameters

URI Parameter Type Description
id long Lodging database unique identifier (used as REST identifier)
arrival String Stay arrival (format: "YYYYMMDD")
departure String Stay departure (format: "YYYYMMDD")

Example Request

https://api.poplidays.com/v2/lodgings/166963/stays/suggests/20130122-20130124

Example Response

json

[
   {
      "id": "166963-20130122-20130124",
      "lodgingId": 166963,
      "arrival": "20130122",
      "departure": "20130124",
      "basePrice": 127.65,
      "price": 127.65,
      "discountPercent": 0,
      "priceEnabled":true,
      "requestOnly":false,
      "discounts": []
   },
   {
      "id": "166963-20130124-20130126",
      "lodgingId": 166963,
      "arrival": "20130124",
      "departure": "20130126",
      "basePrice": 127.65,
      "price": 127.65,
      "discountPercent": 0,
      "priceEnabled":true,
      "requestOnly":false,
      "discounts": []
   },
   {
      "id": "166963-20130123-20130125",
      "lodgingId": 166963,
      "arrival": "20130123",
      "departure": "20130125",
      "basePrice": 127.65,
      "price": 127.65,
      "discountPercent": 0,
      "priceEnabled":true,
      "requestOnly":false,
      "discounts": []
   },
   {
      "id": "166963-20130125-20130127",
      "lodgingId": 166963,
      "arrival": "20130125",
      "departure": "20130127",
      "basePrice": 127.65,
      "price": 127.65,
      "discountPercent": 0,
      "discounts": []
   }
]

xml

<?xml version="1.0" encoding="UTF-8"?>
<stays>
   <stay>
      <id>166963-20130122-20130124</id>
      <lodgingId>166963</lodgingId>
      <arrival>20130122</arrival>
      <departure>20130124</departure>
      <basePrice>127.65</basePrice>
      <price>127.65</price>
      <discountPercent>0</discountPercent>
      <priceEnabled>true</priceEnabled>
      <requestOnly>false</requestOnly>
      <discounts />
   </stay>
   <stay>
      <id>166963-20130124-20130126</id>
      <lodgingId>166963</lodgingId>
      <arrival>20130124</arrival>
      <departure>20130126</departure>
      <basePrice>127.65</basePrice>
      <price>127.65</price>
      <discountPercent>0</discountPercent>
      <priceEnabled>true</priceEnabled>
      <requestOnly>false</requestOnly>
      <discounts />
   </stay>
   <stay>
      <id>166963-20130123-20130125</id>
      <lodgingId>166963</lodgingId>
      <arrival>20130123</arrival>
      <departure>20130125</departure>
      <basePrice>127.65</basePrice>
      <price>127.65</price>
      <discountPercent>0</discountPercent>
      <priceEnabled>true</priceEnabled>
      <requestOnly>false</requestOnly>
      <discounts />
   </stay>
   <stay>
      <id>166963-20130125-20130127</id>
      <lodgingId>166963</lodgingId>
      <arrival>20130125</arrival>
      <departure>20130127</departure>
      <basePrice>127.65</basePrice>
      <price>127.65</price>
      <discountPercent>0</discountPercent>
      <discounts />
   </stay>
</stays>