Perform an availability request for a single property with pricing per day breakdown
/availability/{propertycode}/breakdown
NAME | TYPE | RANGE / SET | REQUIRED | DEFAULT | EXAMPLE | NOTES |
---|---|---|---|---|---|---|
checkin | date (ISO 8601) | from today to (today + 3 years) |
YES | – | &checkin=2024-09-27 | |
checkout | date (ISO 8601) |
from (checkin + 1) to (checkin + 30) |
YES* | checkin + 1 day | &checkout=2024-10-04 | 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 | |
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 checkout or nights, never both. checkout parameter takes precedence if both present.
** Use either party or rooms + adults + children + infants, never both. party parameter takes precedence if both present.
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. |
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 |
rate | integer | NO | – | &rate=448033 | Only returns availability for specified rate |
† You can use remote_country or remote_ip. If you use both, remote_country takes precedence and remote_ip is ignored.
{ "method": "http://rest.reserve-online.net/availability/DEMO/breakdown", "http_method": "GET", "http_code": 200, "error_code": "OK", "error_msg": "", "params": [ { "type": "URL", "name": "checkin", "value": "2024-09-27" }, { "type": "URL", "name": "checkout", "value": "2024-10-04" } ], "data": { "currency":ISO 4217, // Rate price currency code "rates": [ // List of rates breakdown { "id":INTEGER, // Rate ID "room":STRING, // Rate room type code "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. "price":MONEY, // Room final price "initial":MONEY, // Room initial price "discount":MONEY, // Price discount (The below appear appear only for Travel Agent/Corporate accounts) "margin":MONEY, // Difference between retail and NET price "retail":MONEY, // Retail rate price } ], "pricing": { "extras":MONEY, // Extras amount "tax":MONEY, // Taxes amount "excluded_charges":MONEY, // Excluded charges amount "stay":MONEY // Room price (exclusive of extras and taxes) (The below appear only for Hotelier accounts) "total":MONEY, // Total rate price. This is the final price in case of booking. "initial":MONEY, // Initial total rate price (The below appear only for Travel Agent/Corporate accounts) "price":MONEY, // Total NET price "margin":MONEY, // Difference between retail and NET price } (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 "tax":MONEY, // Retail taxes amount "excluded_charges":MONEY, // Retail excluded charges amount "price":MONEY, // Retail total rate price "discount":MONEY, // Retail Price discount }, } ] } }
method: 'http://rest.reserve-online.net/availability/DEMO/breakdown', http_method: 'GET', http_code: 200, error_code: 'OK', error_msg: '', params: [ { type: 'URL', name: 'checkin', value: '2024-07-28', }, { type: 'URL', name: 'nights', value: '4', }, ], data: { currency: 'EUR', rates: [ { id: 123456, room: 'JSUI', days: [ { date: '2024-07-28', price: 76.95, retail: 85.5, margin: 8.55, initial: 90, discount: 4.5, }, { date: '2024-07-29', price: 76.95, retail: 85.5, margin: 8.55, initial: 90, discount: 4.5, }, { date: '2024-07-30', price: 76.95, retail: 85.5, margin: 8.55, initial: 90, discount: 4.5, }, { date: '2024-07-31', price: 76.95, retail: 85.5, margin: 8.55, initial: 90, discount: 4.5, }, ], pricing: { stay: 307.8, extras: 0, tax: 0, excluded_charges: 2, price: 307.8, margin: 34.2, }, retail: { stay: 342, extras: 0, tax: 0, excluded_charges: 2, price: 342, discount: 18, } } ] }