index

getDescriptions JSON


Instructions

This is a BETA function and subject to change

If you want to use this function please contact support to have your IP address whitelisted

Post JSON data here to get descriptive information for a room or property. This information can be used to construct a booking application.

See here for information about using the JSON API.

The getDescriptions requires at least one of the parameters roomId or propId.

If propId is specified without roomId, property information only will be returned

If roomId is specified without propId, room information only will be returned

If both propId and roomId are specified, property and room information only will be returned

If propId and roomId = true is specified, property and information for all rooms will be returned

If the lang parameter is not specified, the default booking language will be assumed.

apiKey and propKey are not required to authenticate access to this function.

Example Data

Return descriptions for the specified propId

{
    "propId": "3103"
}

Return descriptions for the specified propId and all its rooms in German

{
    "propId": "3103",
    "roomId": true,
    "lang": "de"
}

Return descriptions for the specified roomId in English

{
    "roomId": "6027",
    "lang": "en"
}

Sample PHP code

<?php

/*
* 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 the availability for one property with the specified parameters. 
* Change the propId and other parameters to values for your account to use and test.
*/

$data = array();
$data["propId"] = "3103";
$data["lang"] = "en";

$json = json_encode($data);

$url = "https://manage.bookingautomation.com/api/json/getDescriptions";

$ch=curl_init();
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;	

?>