Gets hotels descriptions.
curl --request GET \
--url https://{apiBaseUrl}/v2/{sessionId}/description/hotelsconst url = 'https://{apiBaseUrl}/v2/{sessionId}/description/hotels';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/{sessionId}/description/hotels"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v2/{sessionId}/description/hotels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/v2/{sessionId}/description/hotels");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://{apiBaseUrl}/v2/{sessionId}/description/hotels")
.asString();{
"hotels": [
{
"hotelId": "12345",
"name": "Nom de l'hôtel",
"information": {
"code": "HOTELCODE",
"roomCount": 20,
"rating": 5,
"accommodation": {
"text": "Hotel",
"value": "Hotel"
},
"summary": [
{
"text": "Description de l'hotel",
"value": "PlainText"
}
],
"pictures": [
{
"templates": [
{
"name": "TEMPLATE1",
"url": "http://url/to/template1/image1"
},
{
"name": "TEMPLATE2",
"url": "http://url/to/template2/image1"
}
],
"sortOrder": 1
},
{
"templates": [
{
"name": "TEMPLATE1",
"url": "http://url/to/template1/image2"
},
{
"name": "TEMPLATE2",
"url": "http://url/to/template2/image2"
}
],
"sortOrder": 2
}
]
},
"location": {
"timeZone": "Europe/Paris",
"addressLines": [
"3 place Rouge"
],
"postalCode": "75009",
"city": "Paris",
"district": "9e arrondissement",
"country": {
"code": "FRA",
"name": "France"
},
"gpsPosition": {
"latitude": 0.1567325634231,
"longitude": 58.01534217892
},
"directions": [
{
"text": "Description pour se rendre à l'hotel",
"value": "PlainText"
}
]
},
"booking": {
"adults": {
"maxCount": 20,
"minAge": 12,
"maxAge": 2147483647
},
"children": {
"maxCount": 20,
"minAge": 2,
"maxAge": 12
},
"infants": {
"maxCount": 20,
"minAge": 0,
"maxAge": 2
},
"cardTypes": [
"AmericanExpress",
"Visa"
],
"paymentMethods": {
"supportedCardTypes": [
"AmericanExpress",
"Visa"
],
"supportedPaymentMethods": [
"IDeal",
"Paypal"
]
},
"currencies": [
"EUR",
"USD"
],
"defaultCurrency": "EUR"
},
"services": [
{
"category": {
"text": "General",
"value": "General"
},
"amenities": [
{
"text": "Air conditionné",
"value": "AirConditioning"
}
]
}
],
"reception": {
"amenities": [
{
"text": "Bar",
"value": "Bar"
}
],
"checkInTime": {
"text": "18:00",
"value": "18:00:00"
},
"checkOutTime": {
"text": "12:00",
"value": "12:00:00"
},
"openingHours": {
"value": {
"openingTime": "08:00:00",
"closureTime": "23:00:00"
}
}
},
"contact": {
"managerName": "Mr Hotel Manager",
"emails": [
"contact@hotel.com"
],
"phones": [
"0123456789"
],
"faxes": [
"0123456789"
],
"webSites": [
"http://www.hotel.com"
]
},
"cancelConditions": {
"planningCancelConditions": {
"A": [
{
"delay": 0,
"nightCount": 1,
"nominal": 0,
"percent": 10,
"hour": "00:00:00"
}
]
},
"description": [
{
"text": "Description des conditions d'annulation",
"value": "PlainText"
}
]
},
"roomIds": [
1111,
2222,
3333
],
"rateIds": [
1111,
2222,
3333
],
"hotelExtraIds": [
1111,
2222,
3333
],
"roomExtraIds": [
1111,
2222,
3333
],
"occupancyIds": [
1111,
2222,
3333
],
"salesTermsAndConditions": {},
"mealPlanIds": []
}
]
}{
"code": "InvalidSessionId"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Description
Gets hotels descriptions
Gets hotels descriptions
GET
/
v2
/
{sessionId}
/
description
/
hotels
Gets hotels descriptions.
curl --request GET \
--url https://{apiBaseUrl}/v2/{sessionId}/description/hotelsconst url = 'https://{apiBaseUrl}/v2/{sessionId}/description/hotels';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/{sessionId}/description/hotels"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v2/{sessionId}/description/hotels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/v2/{sessionId}/description/hotels");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://{apiBaseUrl}/v2/{sessionId}/description/hotels")
.asString();{
"hotels": [
{
"hotelId": "12345",
"name": "Nom de l'hôtel",
"information": {
"code": "HOTELCODE",
"roomCount": 20,
"rating": 5,
"accommodation": {
"text": "Hotel",
"value": "Hotel"
},
"summary": [
{
"text": "Description de l'hotel",
"value": "PlainText"
}
],
"pictures": [
{
"templates": [
{
"name": "TEMPLATE1",
"url": "http://url/to/template1/image1"
},
{
"name": "TEMPLATE2",
"url": "http://url/to/template2/image1"
}
],
"sortOrder": 1
},
{
"templates": [
{
"name": "TEMPLATE1",
"url": "http://url/to/template1/image2"
},
{
"name": "TEMPLATE2",
"url": "http://url/to/template2/image2"
}
],
"sortOrder": 2
}
]
},
"location": {
"timeZone": "Europe/Paris",
"addressLines": [
"3 place Rouge"
],
"postalCode": "75009",
"city": "Paris",
"district": "9e arrondissement",
"country": {
"code": "FRA",
"name": "France"
},
"gpsPosition": {
"latitude": 0.1567325634231,
"longitude": 58.01534217892
},
"directions": [
{
"text": "Description pour se rendre à l'hotel",
"value": "PlainText"
}
]
},
"booking": {
"adults": {
"maxCount": 20,
"minAge": 12,
"maxAge": 2147483647
},
"children": {
"maxCount": 20,
"minAge": 2,
"maxAge": 12
},
"infants": {
"maxCount": 20,
"minAge": 0,
"maxAge": 2
},
"cardTypes": [
"AmericanExpress",
"Visa"
],
"paymentMethods": {
"supportedCardTypes": [
"AmericanExpress",
"Visa"
],
"supportedPaymentMethods": [
"IDeal",
"Paypal"
]
},
"currencies": [
"EUR",
"USD"
],
"defaultCurrency": "EUR"
},
"services": [
{
"category": {
"text": "General",
"value": "General"
},
"amenities": [
{
"text": "Air conditionné",
"value": "AirConditioning"
}
]
}
],
"reception": {
"amenities": [
{
"text": "Bar",
"value": "Bar"
}
],
"checkInTime": {
"text": "18:00",
"value": "18:00:00"
},
"checkOutTime": {
"text": "12:00",
"value": "12:00:00"
},
"openingHours": {
"value": {
"openingTime": "08:00:00",
"closureTime": "23:00:00"
}
}
},
"contact": {
"managerName": "Mr Hotel Manager",
"emails": [
"contact@hotel.com"
],
"phones": [
"0123456789"
],
"faxes": [
"0123456789"
],
"webSites": [
"http://www.hotel.com"
]
},
"cancelConditions": {
"planningCancelConditions": {
"A": [
{
"delay": 0,
"nightCount": 1,
"nominal": 0,
"percent": 10,
"hour": "00:00:00"
}
]
},
"description": [
{
"text": "Description des conditions d'annulation",
"value": "PlainText"
}
]
},
"roomIds": [
1111,
2222,
3333
],
"rateIds": [
1111,
2222,
3333
],
"hotelExtraIds": [
1111,
2222,
3333
],
"roomExtraIds": [
1111,
2222,
3333
],
"occupancyIds": [
1111,
2222,
3333
],
"salesTermsAndConditions": {},
"mealPlanIds": []
}
]
}{
"code": "InvalidSessionId"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Was this page helpful?