curl --request POST \
--url https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar \
--header 'Content-Type: application/json' \
--data '
{
"beginDate": "2027-08-31",
"endDate": "2027-08-31",
"guests": [
{
"adults": 2,
"children": [
{
"age": 10,
"count": 1
}
],
"infants": 0
}
],
"filter": {
"ratePlan": {
"hotelId": 1234,
"groupId": 9876,
"referenceRateCode": "RACKPRI"
},
"rooms": {
"exceptions": [
3456
]
},
"rates": {
"exceptions": [
5678
]
},
"currency": "EUR",
"customerLocation": {
"geonameId": 3017382
},
"loyaltyProgram": {
"membershipLevel": 0
},
"options": [],
"maximumStay": 15
},
"behaviour": "LowestLengthOfStay",
"impersonation": {
"hotelId": 1234,
"groupId": 9876,
"userId": 1357,
"bookingEngineId": "1XXA"
}
}
'const url = 'https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
beginDate: '2027-08-31',
endDate: '2027-08-31',
guests: [{adults: 2, children: [{age: 10, count: 1}], infants: 0}],
filter: {
ratePlan: {hotelId: 1234, groupId: 9876, referenceRateCode: 'RACKPRI'},
rooms: {exceptions: [3456]},
rates: {exceptions: [5678]},
currency: 'EUR',
customerLocation: {geonameId: 3017382},
loyaltyProgram: {membershipLevel: 0},
options: [],
maximumStay: 15
},
behaviour: 'LowestLengthOfStay',
impersonation: {hotelId: 1234, groupId: 9876, userId: 1357, bookingEngineId: '1XXA'}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar"
payload = {
"beginDate": "2027-08-31",
"endDate": "2027-08-31",
"guests": [
{
"adults": 2,
"children": [
{
"age": 10,
"count": 1
}
],
"infants": 0
}
],
"filter": {
"ratePlan": {
"hotelId": 1234,
"groupId": 9876,
"referenceRateCode": "RACKPRI"
},
"rooms": { "exceptions": [3456] },
"rates": { "exceptions": [5678] },
"currency": "EUR",
"customerLocation": { "geonameId": 3017382 },
"loyaltyProgram": { "membershipLevel": 0 },
"options": [],
"maximumStay": 15
},
"behaviour": "LowestLengthOfStay",
"impersonation": {
"hotelId": 1234,
"groupId": 9876,
"userId": 1357,
"bookingEngineId": "1XXA"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'beginDate' => '2027-08-31',
'endDate' => '2027-08-31',
'guests' => [
[
'adults' => 2,
'children' => [
[
'age' => 10,
'count' => 1
]
],
'infants' => 0
]
],
'filter' => [
'ratePlan' => [
'hotelId' => 1234,
'groupId' => 9876,
'referenceRateCode' => 'RACKPRI'
],
'rooms' => [
'exceptions' => [
3456
]
],
'rates' => [
'exceptions' => [
5678
]
],
'currency' => 'EUR',
'customerLocation' => [
'geonameId' => 3017382
],
'loyaltyProgram' => [
'membershipLevel' => 0
],
'options' => [
],
'maximumStay' => 15
],
'behaviour' => 'LowestLengthOfStay',
'impersonation' => [
'hotelId' => 1234,
'groupId' => 9876,
'userId' => 1357,
'bookingEngineId' => '1XXA'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"beginDate\": \"2027-08-31\",\n \"endDate\": \"2027-08-31\",\n \"guests\": [\n {\n \"adults\": 2,\n \"children\": [\n {\n \"age\": 10,\n \"count\": 1\n }\n ],\n \"infants\": 0\n }\n ],\n \"filter\": {\n \"ratePlan\": {\n \"hotelId\": 1234,\n \"groupId\": 9876,\n \"referenceRateCode\": \"RACKPRI\"\n },\n \"rooms\": {\n \"exceptions\": [\n 3456\n ]\n },\n \"rates\": {\n \"exceptions\": [\n 5678\n ]\n },\n \"currency\": \"EUR\",\n \"customerLocation\": {\n \"geonameId\": 3017382\n },\n \"loyaltyProgram\": {\n \"membershipLevel\": 0\n },\n \"options\": [],\n \"maximumStay\": 15\n },\n \"behaviour\": \"LowestLengthOfStay\",\n \"impersonation\": {\n \"hotelId\": 1234,\n \"groupId\": 9876,\n \"userId\": 1357,\n \"bookingEngineId\": \"1XXA\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar")
.header("Content-Type", "application/json")
.body("{\n \"beginDate\": \"2027-08-31\",\n \"endDate\": \"2027-08-31\",\n \"guests\": [\n {\n \"adults\": 2,\n \"children\": [\n {\n \"age\": 10,\n \"count\": 1\n }\n ],\n \"infants\": 0\n }\n ],\n \"filter\": {\n \"ratePlan\": {\n \"hotelId\": 1234,\n \"groupId\": 9876,\n \"referenceRateCode\": \"RACKPRI\"\n },\n \"rooms\": {\n \"exceptions\": [\n 3456\n ]\n },\n \"rates\": {\n \"exceptions\": [\n 5678\n ]\n },\n \"currency\": \"EUR\",\n \"customerLocation\": {\n \"geonameId\": 3017382\n },\n \"loyaltyProgram\": {\n \"membershipLevel\": 0\n },\n \"options\": [],\n \"maximumStay\": 15\n },\n \"behaviour\": \"LowestLengthOfStay\",\n \"impersonation\": {\n \"hotelId\": 1234,\n \"groupId\": 9876,\n \"userId\": 1357,\n \"bookingEngineId\": \"1XXA\"\n }\n}")
.asString();[
{
"arrivalDate": "2027-08-31",
"minimumStay": 2,
"maximumStay": 15,
"totalPrice": 100.5,
"originalTotalPrice": 120,
"currency": "EUR",
"offerCodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hotelAvailability": 5,
"status": "Available",
"unavailabilityReason": "None",
"closedOnDeparture": true,
"rateId": 5678,
"rooms": [
{
"roomId": 3456,
"availability": 3,
"guests": {
"adults": 2,
"children": [
{
"age": 10,
"count": 1
}
],
"infants": 0
}
}
],
"additionalTaxes": 5.5,
"additionalFees": 2,
"includedTaxes": 9.15,
"includedFees": 1.5
}
]{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Calendar
Best price per arrival date, for one hotel
curl --request POST \
--url https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar \
--header 'Content-Type: application/json' \
--data '
{
"beginDate": "2027-08-31",
"endDate": "2027-08-31",
"guests": [
{
"adults": 2,
"children": [
{
"age": 10,
"count": 1
}
],
"infants": 0
}
],
"filter": {
"ratePlan": {
"hotelId": 1234,
"groupId": 9876,
"referenceRateCode": "RACKPRI"
},
"rooms": {
"exceptions": [
3456
]
},
"rates": {
"exceptions": [
5678
]
},
"currency": "EUR",
"customerLocation": {
"geonameId": 3017382
},
"loyaltyProgram": {
"membershipLevel": 0
},
"options": [],
"maximumStay": 15
},
"behaviour": "LowestLengthOfStay",
"impersonation": {
"hotelId": 1234,
"groupId": 9876,
"userId": 1357,
"bookingEngineId": "1XXA"
}
}
'const url = 'https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
beginDate: '2027-08-31',
endDate: '2027-08-31',
guests: [{adults: 2, children: [{age: 10, count: 1}], infants: 0}],
filter: {
ratePlan: {hotelId: 1234, groupId: 9876, referenceRateCode: 'RACKPRI'},
rooms: {exceptions: [3456]},
rates: {exceptions: [5678]},
currency: 'EUR',
customerLocation: {geonameId: 3017382},
loyaltyProgram: {membershipLevel: 0},
options: [],
maximumStay: 15
},
behaviour: 'LowestLengthOfStay',
impersonation: {hotelId: 1234, groupId: 9876, userId: 1357, bookingEngineId: '1XXA'}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar"
payload = {
"beginDate": "2027-08-31",
"endDate": "2027-08-31",
"guests": [
{
"adults": 2,
"children": [
{
"age": 10,
"count": 1
}
],
"infants": 0
}
],
"filter": {
"ratePlan": {
"hotelId": 1234,
"groupId": 9876,
"referenceRateCode": "RACKPRI"
},
"rooms": { "exceptions": [3456] },
"rates": { "exceptions": [5678] },
"currency": "EUR",
"customerLocation": { "geonameId": 3017382 },
"loyaltyProgram": { "membershipLevel": 0 },
"options": [],
"maximumStay": 15
},
"behaviour": "LowestLengthOfStay",
"impersonation": {
"hotelId": 1234,
"groupId": 9876,
"userId": 1357,
"bookingEngineId": "1XXA"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'beginDate' => '2027-08-31',
'endDate' => '2027-08-31',
'guests' => [
[
'adults' => 2,
'children' => [
[
'age' => 10,
'count' => 1
]
],
'infants' => 0
]
],
'filter' => [
'ratePlan' => [
'hotelId' => 1234,
'groupId' => 9876,
'referenceRateCode' => 'RACKPRI'
],
'rooms' => [
'exceptions' => [
3456
]
],
'rates' => [
'exceptions' => [
5678
]
],
'currency' => 'EUR',
'customerLocation' => [
'geonameId' => 3017382
],
'loyaltyProgram' => [
'membershipLevel' => 0
],
'options' => [
],
'maximumStay' => 15
],
'behaviour' => 'LowestLengthOfStay',
'impersonation' => [
'hotelId' => 1234,
'groupId' => 9876,
'userId' => 1357,
'bookingEngineId' => '1XXA'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"beginDate\": \"2027-08-31\",\n \"endDate\": \"2027-08-31\",\n \"guests\": [\n {\n \"adults\": 2,\n \"children\": [\n {\n \"age\": 10,\n \"count\": 1\n }\n ],\n \"infants\": 0\n }\n ],\n \"filter\": {\n \"ratePlan\": {\n \"hotelId\": 1234,\n \"groupId\": 9876,\n \"referenceRateCode\": \"RACKPRI\"\n },\n \"rooms\": {\n \"exceptions\": [\n 3456\n ]\n },\n \"rates\": {\n \"exceptions\": [\n 5678\n ]\n },\n \"currency\": \"EUR\",\n \"customerLocation\": {\n \"geonameId\": 3017382\n },\n \"loyaltyProgram\": {\n \"membershipLevel\": 0\n },\n \"options\": [],\n \"maximumStay\": 15\n },\n \"behaviour\": \"LowestLengthOfStay\",\n \"impersonation\": {\n \"hotelId\": 1234,\n \"groupId\": 9876,\n \"userId\": 1357,\n \"bookingEngineId\": \"1XXA\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/Planning/2018A/BestPrice/Calendar")
.header("Content-Type", "application/json")
.body("{\n \"beginDate\": \"2027-08-31\",\n \"endDate\": \"2027-08-31\",\n \"guests\": [\n {\n \"adults\": 2,\n \"children\": [\n {\n \"age\": 10,\n \"count\": 1\n }\n ],\n \"infants\": 0\n }\n ],\n \"filter\": {\n \"ratePlan\": {\n \"hotelId\": 1234,\n \"groupId\": 9876,\n \"referenceRateCode\": \"RACKPRI\"\n },\n \"rooms\": {\n \"exceptions\": [\n 3456\n ]\n },\n \"rates\": {\n \"exceptions\": [\n 5678\n ]\n },\n \"currency\": \"EUR\",\n \"customerLocation\": {\n \"geonameId\": 3017382\n },\n \"loyaltyProgram\": {\n \"membershipLevel\": 0\n },\n \"options\": [],\n \"maximumStay\": 15\n },\n \"behaviour\": \"LowestLengthOfStay\",\n \"impersonation\": {\n \"hotelId\": 1234,\n \"groupId\": 9876,\n \"userId\": 1357,\n \"bookingEngineId\": \"1XXA\"\n }\n}")
.asString();[
{
"arrivalDate": "2027-08-31",
"minimumStay": 2,
"maximumStay": 15,
"totalPrice": 100.5,
"originalTotalPrice": 120,
"currency": "EUR",
"offerCodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hotelAvailability": 5,
"status": "Available",
"unavailabilityReason": "None",
"closedOnDeparture": true,
"rateId": 5678,
"rooms": [
{
"roomId": 3456,
"availability": 3,
"guests": {
"adults": 2,
"children": [
{
"age": 10,
"count": 1
}
],
"infants": 0
}
}
],
"additionalTaxes": 5.5,
"additionalFees": 2,
"includedTaxes": 9.15,
"includedFees": 1.5
}
]{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Body
The period to cover (begin and end dates, both included), the party of guests to accommodate, the rate plan, rooms and rates to look at, and how to arbitrate between restricted dates. Guests is an array but only one item is currently allowed; sending more is rejected with a 400.
Request a number of daily best prices for a given period, for a given number of guests
First date to be returned
"2027-08-31"
End of the requested period. This date is included
"2027-08-31"
Number of guests the price is requested for. One item per "party". Exactly one item is currently allowed: the array is kept for forward compatibility, and a request with more than one party is rejected with a 400.
1 elementShow child attributes
Show child attributes
Filter to apply to the best price request
Show child attributes
Show child attributes
When the date has restrictions, indicates how to behave
- LowestLengthOfStay: (default): Will prioritise the shortest length of stay, to prevent displaying dates with minimum stays when there is a flexible rate available
- CheapestStay: Will prioritise the cheapest stay, to prevent an overpriced flexible stay from being returned when longer stays are cheaper
LowestLengthOfStay, CheapestStay Impersonation information to restrict the scope of the request
Show child attributes
Show child attributes
Response
One entry per arrival date of the period, with the best price found, the effective stay restrictions, the hotel availability and, when no arrival is possible, the reason.
Arrival date (yyyy-MM-dd)
"2027-08-31"
Effective minimum stay for an arrival that day, on this rate and room.
2
Effective maximum stay for an arrival that day, on this rate and room. Value is capped at the values provided in the request INFO: There may be other (more expensive) offers that will allow the guest to stay longer
15
Best Total price (Room + meals) to host all guests that day (average per night if minimum stay > 1)
100.5
Total price without promotion applied (average per night if minimum stay > 1) Value is omitted if there is no promotion that day
120
Iso Currency code.
"EUR"
id of the promotion applicable to that day Value is omitted if there is no promotion with an id that day
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Total number of rooms available in the hotel that day (all room types, all rates)
5
Whether an arrival is possible that day, and if so whether it can be booked directly
- Available: Room is available for booking
- OnRequest: Hotel must confirm availability before booking
- NotAvailable: Room is not available for booking
Available, OnRequest, NotAvailable Why an arrival is not possible that day. Set to none when the arrival is possible.
- None: Hotel is available
- GuestsDoNotFitInRoom: There is no room in the hotel that can fit that number of guests together
- NoArrival: There is availability, but it is not possible to arrive that day
- MultipleRates: (Only in case of multiple parties of guests in the request): There is availability, but the best price is on different rates.The price may not be correct
- MinimumStayTooLong: There is no rate available that day that meets the maximum length of stay requested
- Other: Other reasons (hotel has probably no inventory left)
None, GuestsDoNotFitInRoom, NoArrival, MultipleRates, MinimumStayTooLong, Other Whether guests can leave the hotel that day
Identifier of the best rate When requesting multiple parties at once, we return 0 if the best rate is not the same across all rooms
5678
Rooms availability and guest allocation
Show child attributes
Show child attributes
Taxes that must be collected in addition to the TotalPrice (due on site or at booking)
5.5
Fees that must be collected in addition to the TotalPrice (due on site or at booking)
2
Taxes that are included in the TotalPrice
9.15
Fees that are included in the TotalPrice
1.5
Was this page helpful?