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>"
}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.
Was this page helpful?