GET /v2/lodgings/{id}/availabilities

Returns all available stays and prices of specified lodging

Resource information

Authentication No
Response Formats xml, json
HTTP Method GET
Response Object field last change and list Availabilities
API Version v2

Resource parameters

Query Parameter Type Cached Query Mandatory Description
limit String No (queries are slower with this parameter than without, use it with caution) No Only availabilities whose arrival day is before or equal to this day will be returned (format: "YYYYMMDD")
duration list<String> No (queries are slower with this parameter than without, use it with caution) No List of desired duration. Only availabilities whose stay duration is in list will be returned

Result

Field Type Required Description
lastChange String true date of change of the LOS format: iso8601 (YYYY-MM-dd HH:mm)
lodgingPack String false pack of promotion for the contract
hasPromo Boolean false true if the planning have one applied promotion
availabilities List<Availability> false list of possible stay

Example Request

https://api.poplidays.com/v2/lodgings/886/availabilities

Example Response

json

{
   "lastChange":"2014-05-20+02:00",    
   "lodgingPack": "pack123456-vieuxboucau",
   "hasPromo": true,
   "availabilities":[
   {
      "arrival":"20130330",
      "departure":"20130401",
      "basePrice":100.0,
      "price":60.0,
      "discountPercent":40
      "priceEnabled":true,
      "promotions": {
            "promotion": [
                {
                    "code": "LAST_MINUTE_pack123456"
                }
            ]
      }
      "requestOnly":false
   },
   {
      "arrival":"20130330",
      "departure":"20130402",
      "basePrice":110.0,
      "price":66.0,
      "discountPercent":40,
      "priceEnabled":true,
      "requestOnly":false
   }]
}

xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<availabilities>
  <lastChange>2014-05-20+02:00</lastChange>
  <lodgingPack>pack123456-vieuxboucau</lodgingPack>
  <hasPromo>true</hasPromo>
  <availability>
    <arrival>20130330</arrival>
    <departure>20130401</departure>
    <basePrice>100.0</basePrice>
    <price>60.0</price>
    <discountPercent>40</discountPercent>
    <priceEnabled>true</priceEnabled>
    <promotions>
        <promotion code="LAST"/>
        <promotion code="MINUTE"/>
        <promotion code="pack123456"/>
    </promotions>
    <requestOnly>false</requestOnly>
  </availability>
  <availability>
    <arrival>20130330</arrival>
    <departure>20130402</departure>
    <basePrice>110.0</basePrice>
    <price>66.0</price>
    <discountPercent>40</discountPercent>
    <priceEnabled>true</priceEnabled>
    <requestOnly>false</requestOnly>
  </availability>
</availabilities>