Perform an availability request for a single property

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

URL Endpoint

/availability/{propertycode}

Method Parameters

Basic parameters

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
checkin date (ISO 8601) from today
to (today + 2 years)
YES &checkin=2019-07-14  
checkout date (ISO 8601) from (checkin + 1)
to (checkin + 30)
YES* checkin + 1 day &checkout=2019-07-21 When used, number of nights is automatically calculated. Limitations apply (see nights).
nights integer 1 – 30 YES* 1 &nights=2  
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  

* Use either checkout or nights, never both. checkout parameter takes precedence if both present.


Filters

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
room string varchar(6) NO &room=DBL Only returns availability for specified room type
rate integer NO &rate=1000 Only returns availability for specified rate
board integer 1 – 23 NO &board=19
&board=3,19,21
Returns rates with specified board

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.
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
breakdown boolean   NO false &breakdown=1 Returns rate's price daily breakdown.
offline boolean   NO false &offline=1 Returns all rates, even those not available.

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

JSON Response Schema

{
	"method": "http://rest.reserve-online.net/availability/DEMO",
	"http_method": "GET",
	"http_code": 200,
	"error_code": "OK",
	"error_msg": "",
	"params": [
		{
			"type": "URL",
			"name": "checkin",
			"value": "2019-07-14"
		},
		{
			"type": "URL",
			"name": "checkout",
			"value": "2019-07-21"
		}
	],
	"data": {
		"code":STRING, // Property code 
		"name":STRING, // Property name
		"currency":ISO 4217, // Rate currency ISO code
		"url": {
			"website":URL, // Property website url (empty if not defined)
			"info":URL, // API URL for property info request
			"engine":URL, // Property booking engine url (empty if not defined)
			"photo":URL, // Property photo url - Small size (empty if not defined)
			"photoM":URL, // Property photo url - Medium size (empty if not defined)
			"photoL":URL // Property photo url - Large size (empty if not defined)
		},
		"location": {
			"lat":DECIMAL, // Property latitude (empty if not defined)
			"lon":DECIMAL // Property longitude (empty if not defined)
		},
		"rates": [ // List of rates
			{
				"id":INTEGER, // Rate unique id
				"type":STRING, // Room type code
				"room":STRING, // Room type name
				"rate":STRING, // Rate name
				"rate_desc":STRING, // Rate description
				"payment_policy":STRING, // Rate payment policy description
				"payment_policy_id":INTEGER, // Rate payment policy id (for internal use)
				"cancellation_policy":STRING, // Rate cancellation policy description
				"cancellation_policy_id":INTEGER, // Rate cancellation policy id (for internal use)
				"cancellation_penalty":STRING, // Rate cancellation penalty description
				"remaining":INTEGER, // Remaining available rooms
				"cancellation_expiry":ISO 8601, // Free cancellation expiry date timestamp (empty if no free cancellation is set)
				"board":INTEGER // Board ID (empty if not defined). See Board Types
				"url": {
					"engine":URL, // Booking engine availability url with the specified parameters 
					"rate":URL, // API URL for rate info request  
					"room":URL, // API URL for room info request 
					"photo":URL, // Photo url - Small size (empty if not defined)
					"photoM":URL, // Photo url - Medium size (empty if not defined)
					"photoL":URL // Photo url - Large size (empty if not defined)
				},
				"pricing": {
					"stay":MONEY, // Room price (exclusive of extras and taxes)
					"extras":MONEY, // Extras amount
					"taxes":MONEY, // Taxes amount
					"excluded_charges":MONEY, // Excluded charges amount
					"price":MONEY, // Total rate price. This is the final price in case of booking.
					"discount":MONEY, // Discount amount. Indicates if the rate is an offer.
				},
				(Appears only for Travel Agent/Corporate accounts. Can be used as a threshold to determine your markup.
				A NET rate may not always be derived from a retail rate. In this case, the retail price is the same as the NET price.)
				"retail": {
					"stay":MONEY, // Retail room price (exclusive of extras and taxes)
					"extras":MONEY, // Retail extras amount
					"taxes":MONEY, // Retail taxes amount
					"excluded_charges":MONEY, // Retail excluded charges amount
					"price":MONEY, // Retail total rate price
					"margin":MONEY, // Difference between retail and NET price
				},
				"payments": [
					{
						"due":ISO 8601 // Payment due date 
						"amount":MONEY, // Amount to be paid until the above date
					}
				],
				"cancellation_fees": [
					{
						"after":ISO 8601 // Cancellation fee is applied if the reservation is cancelled after this date
						"fee":MONEY, // Cancellation fee amount that applies after the above date
					}
				],
				(Appears only for breakdown=1)
				"days": [ // Pricing per day breakdown
					{
						"date":ISO 8601, // Date in ISO 8601 format
						"min_stay":INTEGER, // Minimum stay in days. Optional, exists only when > 1.
						"max_stay":INTEGER // Maximum stay in days. Optional, exists only when defined.
						"checkin":BOOLEAN, // 1=Check-in is allowed, 0=Check-in not allowed (optional, default=1)
						"status":STRING, // Availability status other than "AVL", appears only if for offline=1. See Availability Status Codes
						"remaining":INTEGER, // Remaining available rooms
						"price":MONEY, // Room final price 
						"initial":MONEY, // Room initial price 
						"discount":MONEY, // Price discount 
					}
				],
				(Appear only for offline=1)
				"status":STRING, // Availability status code. See Availability Status Codes
				"status_descr": STRING, // Availability status title. See Availability Status Codes
			}
		]
	}
}
	

JSON Response Example

In the example below the request was submitted with offline=1. This is why rates with statuses other than AVL were returned (e.g. SS = Stop Sales and RATE = Pricing Missing). See more in the Availability Status table