getRoomDates JSON


Post JSON data here to get room price and availability.

See here for information about using the JSON API.

Example Data

    "authentication": {
        "apiKey": "apiKeyAsSetInAccountSettings",
        "propKey": "propKeyAsSetForTheProperty"
    "roomId": 12345,
    "from": "20181220",
    "to": "20190118",
    "incMaxStay": 0,
    "incMultiplier": 0,
    "incOverride": 0,
    "allowInventoryNegative": 0

Request Data Fields

FieldDescriptionData TypeRequiredNotes
apiKeyapiKey for accountstringrequired
propKeypropKey for propertystringrequired
roomIdroom id for roomintegerrequired
fromfrom datedate (yyyymmdd)optionaldefault=today
toto datedate (yyyymmdd)optionaldefault=+30 days
incMaxStayinclude maximum stayintegeroptionaldefault=0; 0=no, 1=yes
incMultiplierinclude multiplierintegeroptionaldefault=0; 0=no, 1=yes
incOverrideinclude override statusintegeroptionaldefault=0; 0=no, 1=yes
allowInventoryNegativeallow negative inventory valuesintegeroptionaldefault=0; 0=no, 1=yes

Response Data Fields

FieldDescriptionData TypeNotes
iInventoryintegerNumber of units available
mMinimum StayintegerMinimum stay for this date
mxMaximum StayintegerMaximum stay for this date
p1Price row 1decimal
p2Price row 2decimal
p3Price row 3decimal
p4Price row 4decimal
oOverride statusinteger0=none, 1=blackout, 2=no checkin, 3=no checkout, 4=nocheckin/out, 5=exceptional period; missing=0
xMultiplierintegerPercentage value of normal price; missing=auto (100%)

Sample PHP code


* The following sample uses a PHP array to construct the JSON data and php-curl to post it to the API.
* This sample will get one room with the specified parameters. 
* Change the parameters to values for your account.

$auth = array();
$auth['apiKey'] = 'apiKeyAsSetInAccountSettings';
$auth['propKey'] = 'propKeyAsSetForTheProperty';

$data = array();
$data['authentication'] = $auth;

$data['roomId'] = 12345;
$data['from'] = date('Ymd', strtotime('+1 day'));
$data['to'] = date('Ymd', strtotime('+30 days'));

$json = json_encode($data);

$url = "";

curl_setopt($ch, CURLOPT_POST, 1) ;
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
$result = curl_exec($ch);
curl_close ($ch);
echo $result;