Perform an extras availability request

Table of Contents
  1. URL Endpoint
  2. Method Parameters
  3. JSON Response Schema
  4. JSON Response Example

URL Endpoint

/availability/{propertycode}/extras/{rateid}

Method Parameters

Basic parameters

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
checkin date (ISO 8601) from today
to (today + 3 years)
YES &checkin=<2024-11-05  
checkout date (ISO 8601) from (checkin + 1)
to (checkin + 30)
YES checkin + 1 day &checkout=2024-11-12 When used, number of nights is automatically calculated. Limitations apply (see nights).
adults integer 1 – max capacity NO 2 &adults=2 The value is PER ROOM. Maximum value is automatically calculated based on the property's maximum possible room capacity.
children integer 0 – (max capacity-1) NO 0 &children=1 The value is PER ROOM. Maximum value equals (maximum capacity - 1).
infants integer 0 – (max capacity-1) NO 0 &infants=1 The value is PER ROOM. Maximum value equals (maximum capacity - 1).
rooms integer 1 – 5 NO 1 &rooms=2  
party JSON string NO* - One room: &party=[{"adults": 2}]

Two rooms with mixed occupancies: &party=[{"adults":2, "children":[2,6]},{"adults":3}]
Array of JSON objects representing number of adults and children.
"adults": (REQUIRED - integer) The number of adults staying in the room.
"children": (OPTIONAL - array of integers) The ages of any children staying in the room.

* Use either party or rooms + adults + children + infants, never both. party parameter takes precedence if both present.


Advanced parameters

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
remote_country string ISO 3166-1-alpha-2 NO &remote_country=US Specifies remote user's country.
Use ip address geolocation.
Required for working with markets.
remote_ip string Dot-decimal notation NO &remote_ip=94.71.170.105 Specifies remote user's ip address.
Alternative to country.
Required for working with markets.
Only IPv4 supported.
device string MOBILE
DESKTOP
NO* &device=MOBILE Specified user device.
Used to unlock special pricing policies.
bk_code string varchar(255) NO &bk_code=SPECIALRATES Returns private rates that are enabled by specified booking code
voucher string varchar(255) NO &voucher=VCH123 Unlocks special offers

You can use remote_country or remote_ip. If you use both, remote_country takes precedence and remote_ip is ignored.


Method Output

This method returns a response with the following structure (inside data):

JSON Response Schema

...
  extras: [
    {
      "name":STRING,
      "description":STRING,
      "html":STRING,
      "id":INTEGER,
      "extra_price":MONEY, // Price per unit
      "price":MONEY, // Total price for the stay
      "per_day":BOOLEAN, // Pricing per day
      "per_adult":BOOLEAN, // Pricing per adult
      "per_child":BOOLEAN, // Pricing per child
      "per_infant":BOOLEAN, // Pricing per infant
      "per_room":BOOLEAN, // Pricing per room
      "required":BOOLEAN, // 1=It is required and already calculated in the stay's price
      "max_quantity":INTEGER, // Cannot book more than this number
      "excl":Array, // An array of extras ids that this extra cannot be booked with
      "from":ISO 8601,
      "to":ISO 8601
    }
  ]
...

JSON Response Example

{
  "method": "http://rest.reserve-online.net/availability/DEMO/extras/28153",
  "http_method": "GET",
  "http_code": 200,
  "error_code": "OK",
  "error_msg": "",
  "params": [
    {
      "type": "URL",
      "name": "checkin",
      "value": "2024-11-05"
    },
    {
      "type": "URL",
      "name": "checkout",
      "value": "2024-11-06"
    }
  ],
  "data": {
    "extras": [
      {
        "name": "Half Board",
        "description": "Half Board, where the host provides only a breakfast and dinner meals.",
        "id": 17,
        "extra_price": 15,
        "price": 30,
        "per_day": 1,
        "per_adult": 1,
        "per_child": 1,
        "per_infant": 1,
        "per_room": 0,
        "required": 0,
        "max_quantity": 1,
        "excl": [
          6,
          16
        ],
        "fromd": "2024-11-05",
        "tod": "2024-11-06",
        "photo": "https://cdn.webhotelier.net/photos/w=90:h=60:q=90/demo/extra-17/L4.jpg"
      },
      {
        "name": "Full Board",
        "description": "Full Board, where the host provides all three daily meals.",
        "id": 16,
        "extra_price": 25,
        "price": 50,
        "per_day": 1,
        "per_adult": 1,
        "per_child": 1,
        "per_infant": 0,
        "per_room": 0,
        "required": 0,
        "max_quantity": 1,
        "excl": [
          6,
          17
        ],
        "fromd": "2024-11-05",
        "tod": "2024-11-06",
        "photo": "https://cdn.webhotelier.net/photos/w=90:h=60:q=90/demo/extra-16/L5.jpg"
      },
      {
        "name": "Fruit basket",
        "description": "A huge fruit basket full of color, smell and taste.",
        "id": 3,
        "extra_price": 0,
        "price": 0,
        "per_day": 1,
        "per_adult": 0,
        "per_child": 0,
        "per_infant": 0,
        "per_room": 1,
        "required": 0,
        "max_quantity": 1,
        "excl": [
          18
        ],
        "fromd": "2024-11-05",
        "tod": "2024-11-06",
        "photo": "https://cdn.webhotelier.net/photos/w=90:h=60:q=90/demo/extra-3/L5222.jpg"
      },
      {
        "name": "Massage",
        "description": "A soothing massage after a hard day's work will make you feel like paradise.",
        "id": 2,
        "extra_price": 100,
        "price": 200,
        "per_day": 0,
        "per_adult": 1,
        "per_child": 1,
        "per_infant": 0,
        "per_room": 0,
        "required": 0,
        "max_quantity": 1,
        "excl": [],
        "fromd": "2024-11-05",
        "tod": "2024-11-06",
        "photo": "https://cdn.webhotelier.net/photos/w=90:h=60:q=90/demo/extra-2/L5223.jpg"
      },
      {
        "name": "One way airport transfer",
        "description": "Let us pick you from the airport. By our co-operating taxi driver.",
        "id": 9,
        "extra_price": 40,
        "price": 40,
        "per_day": 0,
        "per_adult": 0,
        "per_child": 0,
        "per_infant": 0,
        "per_room": 0,
        "required": 0,
        "max_quantity": 100,
        "excl": [],
        "fromd": "2024-11-05",
        "tod": "2024-11-06",
        "photo": "https://cdn.webhotelier.net/photos/w=90:h=60:q=90/demo/extra-9/L3075.jpg"
      }
    ]
  }
}