Get the session scope
curl --request GET \
--url https://{apiBaseUrl}/v2/{sessionId}/session/scopeconst url = 'https://{apiBaseUrl}/v2/{sessionId}/session/scope';
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}/session/scope"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v2/{sessionId}/session/scope",
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}/session/scope");
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}/session/scope")
.asString();{
"hotelIds": [
"10133"
],
"roomIds": [
1234
],
"rateIds": [
1234
],
"extraIds": [],
"activePromoCode": {
"type": "DiscountCode",
"code": "DISCOUNT",
"rateIds": [
1234
]
},
"selectedRateIds": [
1234
],
"selectedRoomIds": [
1234
],
"highlightedRateIds": [
1234
],
"highlightedRoomIds": [
1234
],
"highlightedHotelIds": [],
"defaultDisplayType": "Room",
"roomDisplayTypes": {},
"mealPlanIds": []
}{
"code": "InvalidSessionId"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Session
Get the session scope
Get the session scope
GET
/
v2
/
{sessionId}
/
session
/
scope
Get the session scope
curl --request GET \
--url https://{apiBaseUrl}/v2/{sessionId}/session/scopeconst url = 'https://{apiBaseUrl}/v2/{sessionId}/session/scope';
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}/session/scope"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v2/{sessionId}/session/scope",
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}/session/scope");
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}/session/scope")
.asString();{
"hotelIds": [
"10133"
],
"roomIds": [
1234
],
"rateIds": [
1234
],
"extraIds": [],
"activePromoCode": {
"type": "DiscountCode",
"code": "DISCOUNT",
"rateIds": [
1234
]
},
"selectedRateIds": [
1234
],
"selectedRoomIds": [
1234
],
"highlightedRateIds": [
1234
],
"highlightedRoomIds": [
1234
],
"highlightedHotelIds": [],
"defaultDisplayType": "Room",
"roomDisplayTypes": {},
"mealPlanIds": []
}{
"code": "InvalidSessionId"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Headers
Path Parameters
Response
Returns the user session scope
The scope of the session. It defines which engine, hotels, rooms and rates the session is allowed to use.
Hotel ids of the current scope.
Room ids of the current scope.
Rate ids of the current scope.
Extra ids of the current scope.
This property is filled with the details of the promocode if the one configured in the context is a valid one.
Show child attributes
Show child attributes
Whether search results are displayed as a room or an accommodation.
Available options:
Room, Accommodation Show child attributes
Show child attributes
MealPlan ids of the current scope.
Was this page helpful?