Creates a new Gift Shop session for a guest
curl --request POST \
--url https://{apiBaseUrl}/v1/Session \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"owner": {
"groupId": 123,
"hotelId": 123
},
"culture": "<string>"
}
'const url = 'https://{apiBaseUrl}/v1/Session';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({owner: {groupId: 123, hotelId: 123}, culture: '<string>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v1/Session"
payload = {
"owner": {
"groupId": 123,
"hotelId": 123
},
"culture": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"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}/v1/Session",
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([
'owner' => [
'groupId' => 123,
'hotelId' => 123
],
'culture' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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}/v1/Session");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
request.AddJsonBody("{\n \"owner\": {\n \"groupId\": 123,\n \"hotelId\": 123\n },\n \"culture\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/v1/Session")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"owner\": {\n \"groupId\": 123,\n \"hotelId\": 123\n },\n \"culture\": \"<string>\"\n}")
.asString();{
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Session
Create a new session
Creates a new Gift Shop session for a guest
POST
/
v1
/
Session
Creates a new Gift Shop session for a guest
curl --request POST \
--url https://{apiBaseUrl}/v1/Session \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"owner": {
"groupId": 123,
"hotelId": 123
},
"culture": "<string>"
}
'const url = 'https://{apiBaseUrl}/v1/Session';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({owner: {groupId: 123, hotelId: 123}, culture: '<string>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v1/Session"
payload = {
"owner": {
"groupId": 123,
"hotelId": 123
},
"culture": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"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}/v1/Session",
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([
'owner' => [
'groupId' => 123,
'hotelId' => 123
],
'culture' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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}/v1/Session");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
request.AddJsonBody("{\n \"owner\": {\n \"groupId\": 123,\n \"hotelId\": 123\n },\n \"culture\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/v1/Session")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"owner\": {\n \"groupId\": 123,\n \"hotelId\": 123\n },\n \"culture\": \"<string>\"\n}")
.asString();{
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Was this page helpful?