Returns best available rate for a single day.

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

URL Endpoint

/bar/{propertycode}

Warning

Availability information may not be guaranteed. This method might not apply dynamic pricing rules that alter availability or pricing as it would happen in an actual availability request.

Method Parameters

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
date date (ISO 8601) from today
to (today + 3 years)
NO today &date=2024-02-22  
per string room NO &per=room Returns BAR per room type
rm_type string varchar(6) NO &rm_type=DBL Computes BAR for specified room type
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).
party JSON string NO* - &party=[{"adults": 2, "children":[2,6]}] 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.
Only one room allowed.

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

JSONP Mode

This API method is available via JavaScript utilizing the JSONP technique.

View a live example

https://rest.reserve-online.net/bar/{propertycode}.js

Example

<script src="https://rest.reserve-online.net/bar/HOTELCODE.js?callback=myCallbackFunction" async></script>

The following additional parameters are supported:

JSONP Parameters

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
callback string JavaScript Function NO &callback=renderBar The function should be globally accessible
container string HTML id global attribute NO &container=bar The script will populate container element with the best available price
Do NOT use with the &per=room parameter

JSON Response Schema

{
	"method": "http://rest.reserve-online.net/bar/DEMO",
	"http_method": "GET",
	"http_code": 200,
	"error_code": "OK",
	"error_msg": "",
	"params": [],
	"data": {
		"rate": {
			"id":INTEGER, // Rate id  
			"room":STRING, // Room type code
			"name":STRING, // Rate name
			"board":INTEGER // Board ID (empty if not defined). See Board Types
			"active":BOOLEAN, // Indicates if rate is active
			"public":BOOLEAN, // Indicates if rate is public or private
			"parent":INTEGER, // Parent rate id. If this value is > 0, it means this rate is a child rate.
			"virtual":BOOLEAN, // Indicates if rate is virtual (imported from 3d party systems e.g Channel Manager)
			"currency":ISO 4217, // Rate currency ISO code
			"roomName":STRING, // Rate room name
			"fromd":ISO 8601, // Rate start date (empty if not defined)
			"tod":ISO 8601, // Rate end date (empty if not defined)
			"constraints": {
				"expiration":ISO 8601, // Rate expiry date (empty if not defined)
				"earlyBookLimit":INTEGER // Days before checkin this rate can be booked
				"freeCancelDays":INTEGER, // Days before checkin this rate can be cancelled without cancellation fees
			},	
			"description":STRING, // Rate short description (empty if not defined)
			"url":URL, // API URL for rate info request
			"roomurl":URL, // API URL for room info request
			"bookurl":URL, // Booking engine URL of the property 
			"price":MONEY, // Rate price
		}
	}
}
	

JSON Response Example