Create a new session
curl --request POST \
--url https://{apiBaseUrl}/v2/session \
--header 'Content-Type: application/json' \
--data '
{
"engineId": "2MIS",
"guestSelectionMode": "Default",
"display": {
"culture": "fr-FR",
"currency": "EUR",
"countryCode": "FR"
},
"context": {
"stayPeriod": {
"arrivalDate": "2026-06-08T00:00:00Z",
"departureDate": "2026-06-13T00:00:00Z"
},
"guests": [
{
"adults": 2,
"children": 0,
"infants": 0,
"position": 1,
"memberLevel": 0
}
],
"selectedHotelId": "10133",
"selectedRoomCode": "29513",
"highlightedRateCode": "32643",
"promoCode": "DISCOUNT",
"excludeMixedRates": false,
"disableCrossSell": false,
"isMobile": false
},
"metadata": {
"customTrackingValues": {}
}
}
'const url = 'https://{apiBaseUrl}/v2/session';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
engineId: '2MIS',
guestSelectionMode: 'Default',
display: {culture: 'fr-FR', currency: 'EUR', countryCode: 'FR'},
context: {
stayPeriod: {arrivalDate: '2026-06-08T00:00:00Z', departureDate: '2026-06-13T00:00:00Z'},
guests: [{adults: 2, children: 0, infants: 0, position: 1, memberLevel: 0}],
selectedHotelId: '10133',
selectedRoomCode: '29513',
highlightedRateCode: '32643',
promoCode: 'DISCOUNT',
excludeMixedRates: false,
disableCrossSell: false,
isMobile: false
},
metadata: {customTrackingValues: {}}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/session"
payload = {
"engineId": "2MIS",
"guestSelectionMode": "Default",
"display": {
"culture": "fr-FR",
"currency": "EUR",
"countryCode": "FR"
},
"context": {
"stayPeriod": {
"arrivalDate": "2026-06-08T00:00:00Z",
"departureDate": "2026-06-13T00:00:00Z"
},
"guests": [
{
"adults": 2,
"children": 0,
"infants": 0,
"position": 1,
"memberLevel": 0
}
],
"selectedHotelId": "10133",
"selectedRoomCode": "29513",
"highlightedRateCode": "32643",
"promoCode": "DISCOUNT",
"excludeMixedRates": False,
"disableCrossSell": False,
"isMobile": False
},
"metadata": { "customTrackingValues": {} }
}
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}/v2/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([
'engineId' => '2MIS',
'guestSelectionMode' => 'Default',
'display' => [
'culture' => 'fr-FR',
'currency' => 'EUR',
'countryCode' => 'FR'
],
'context' => [
'stayPeriod' => [
'arrivalDate' => '2026-06-08T00:00:00Z',
'departureDate' => '2026-06-13T00:00:00Z'
],
'guests' => [
[
'adults' => 2,
'children' => 0,
'infants' => 0,
'position' => 1,
'memberLevel' => 0
]
],
'selectedHotelId' => '10133',
'selectedRoomCode' => '29513',
'highlightedRateCode' => '32643',
'promoCode' => 'DISCOUNT',
'excludeMixedRates' => false,
'disableCrossSell' => false,
'isMobile' => false
],
'metadata' => [
'customTrackingValues' => [
]
]
]),
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}/v2/session");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"engineId\": \"2MIS\",\n \"guestSelectionMode\": \"Default\",\n \"display\": {\n \"culture\": \"fr-FR\",\n \"currency\": \"EUR\",\n \"countryCode\": \"FR\"\n },\n \"context\": {\n \"stayPeriod\": {\n \"arrivalDate\": \"2026-06-08T00:00:00Z\",\n \"departureDate\": \"2026-06-13T00:00:00Z\"\n },\n \"guests\": [\n {\n \"adults\": 2,\n \"children\": 0,\n \"infants\": 0,\n \"position\": 1,\n \"memberLevel\": 0\n }\n ],\n \"selectedHotelId\": \"10133\",\n \"selectedRoomCode\": \"29513\",\n \"highlightedRateCode\": \"32643\",\n \"promoCode\": \"DISCOUNT\",\n \"excludeMixedRates\": false,\n \"disableCrossSell\": false,\n \"isMobile\": false\n },\n \"metadata\": {\n \"customTrackingValues\": {}\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/v2/session")
.header("Content-Type", "application/json")
.body("{\n \"engineId\": \"2MIS\",\n \"guestSelectionMode\": \"Default\",\n \"display\": {\n \"culture\": \"fr-FR\",\n \"currency\": \"EUR\",\n \"countryCode\": \"FR\"\n },\n \"context\": {\n \"stayPeriod\": {\n \"arrivalDate\": \"2026-06-08T00:00:00Z\",\n \"departureDate\": \"2026-06-13T00:00:00Z\"\n },\n \"guests\": [\n {\n \"adults\": 2,\n \"children\": 0,\n \"infants\": 0,\n \"position\": 1,\n \"memberLevel\": 0\n }\n ],\n \"selectedHotelId\": \"10133\",\n \"selectedRoomCode\": \"29513\",\n \"highlightedRateCode\": \"32643\",\n \"promoCode\": \"DISCOUNT\",\n \"excludeMixedRates\": false,\n \"disableCrossSell\": false,\n \"isMobile\": false\n },\n \"metadata\": {\n \"customTrackingValues\": {}\n }\n}")
.asString();{
"sessionId": "924f66dc-1706-4f13-968f-4a35293e8d2b",
"warnings": []
}{
"code": "InvalidHotelId"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Session
Create a new session
Create a new session
POST
/
v2
/
session
Create a new session
curl --request POST \
--url https://{apiBaseUrl}/v2/session \
--header 'Content-Type: application/json' \
--data '
{
"engineId": "2MIS",
"guestSelectionMode": "Default",
"display": {
"culture": "fr-FR",
"currency": "EUR",
"countryCode": "FR"
},
"context": {
"stayPeriod": {
"arrivalDate": "2026-06-08T00:00:00Z",
"departureDate": "2026-06-13T00:00:00Z"
},
"guests": [
{
"adults": 2,
"children": 0,
"infants": 0,
"position": 1,
"memberLevel": 0
}
],
"selectedHotelId": "10133",
"selectedRoomCode": "29513",
"highlightedRateCode": "32643",
"promoCode": "DISCOUNT",
"excludeMixedRates": false,
"disableCrossSell": false,
"isMobile": false
},
"metadata": {
"customTrackingValues": {}
}
}
'const url = 'https://{apiBaseUrl}/v2/session';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
engineId: '2MIS',
guestSelectionMode: 'Default',
display: {culture: 'fr-FR', currency: 'EUR', countryCode: 'FR'},
context: {
stayPeriod: {arrivalDate: '2026-06-08T00:00:00Z', departureDate: '2026-06-13T00:00:00Z'},
guests: [{adults: 2, children: 0, infants: 0, position: 1, memberLevel: 0}],
selectedHotelId: '10133',
selectedRoomCode: '29513',
highlightedRateCode: '32643',
promoCode: 'DISCOUNT',
excludeMixedRates: false,
disableCrossSell: false,
isMobile: false
},
metadata: {customTrackingValues: {}}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/session"
payload = {
"engineId": "2MIS",
"guestSelectionMode": "Default",
"display": {
"culture": "fr-FR",
"currency": "EUR",
"countryCode": "FR"
},
"context": {
"stayPeriod": {
"arrivalDate": "2026-06-08T00:00:00Z",
"departureDate": "2026-06-13T00:00:00Z"
},
"guests": [
{
"adults": 2,
"children": 0,
"infants": 0,
"position": 1,
"memberLevel": 0
}
],
"selectedHotelId": "10133",
"selectedRoomCode": "29513",
"highlightedRateCode": "32643",
"promoCode": "DISCOUNT",
"excludeMixedRates": False,
"disableCrossSell": False,
"isMobile": False
},
"metadata": { "customTrackingValues": {} }
}
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}/v2/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([
'engineId' => '2MIS',
'guestSelectionMode' => 'Default',
'display' => [
'culture' => 'fr-FR',
'currency' => 'EUR',
'countryCode' => 'FR'
],
'context' => [
'stayPeriod' => [
'arrivalDate' => '2026-06-08T00:00:00Z',
'departureDate' => '2026-06-13T00:00:00Z'
],
'guests' => [
[
'adults' => 2,
'children' => 0,
'infants' => 0,
'position' => 1,
'memberLevel' => 0
]
],
'selectedHotelId' => '10133',
'selectedRoomCode' => '29513',
'highlightedRateCode' => '32643',
'promoCode' => 'DISCOUNT',
'excludeMixedRates' => false,
'disableCrossSell' => false,
'isMobile' => false
],
'metadata' => [
'customTrackingValues' => [
]
]
]),
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}/v2/session");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"engineId\": \"2MIS\",\n \"guestSelectionMode\": \"Default\",\n \"display\": {\n \"culture\": \"fr-FR\",\n \"currency\": \"EUR\",\n \"countryCode\": \"FR\"\n },\n \"context\": {\n \"stayPeriod\": {\n \"arrivalDate\": \"2026-06-08T00:00:00Z\",\n \"departureDate\": \"2026-06-13T00:00:00Z\"\n },\n \"guests\": [\n {\n \"adults\": 2,\n \"children\": 0,\n \"infants\": 0,\n \"position\": 1,\n \"memberLevel\": 0\n }\n ],\n \"selectedHotelId\": \"10133\",\n \"selectedRoomCode\": \"29513\",\n \"highlightedRateCode\": \"32643\",\n \"promoCode\": \"DISCOUNT\",\n \"excludeMixedRates\": false,\n \"disableCrossSell\": false,\n \"isMobile\": false\n },\n \"metadata\": {\n \"customTrackingValues\": {}\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/v2/session")
.header("Content-Type", "application/json")
.body("{\n \"engineId\": \"2MIS\",\n \"guestSelectionMode\": \"Default\",\n \"display\": {\n \"culture\": \"fr-FR\",\n \"currency\": \"EUR\",\n \"countryCode\": \"FR\"\n },\n \"context\": {\n \"stayPeriod\": {\n \"arrivalDate\": \"2026-06-08T00:00:00Z\",\n \"departureDate\": \"2026-06-13T00:00:00Z\"\n },\n \"guests\": [\n {\n \"adults\": 2,\n \"children\": 0,\n \"infants\": 0,\n \"position\": 1,\n \"memberLevel\": 0\n }\n ],\n \"selectedHotelId\": \"10133\",\n \"selectedRoomCode\": \"29513\",\n \"highlightedRateCode\": \"32643\",\n \"promoCode\": \"DISCOUNT\",\n \"excludeMixedRates\": false,\n \"disableCrossSell\": false,\n \"isMobile\": false\n },\n \"metadata\": {\n \"customTrackingValues\": {}\n }\n}")
.asString();{
"sessionId": "924f66dc-1706-4f13-968f-4a35293e8d2b",
"warnings": []
}{
"code": "InvalidHotelId"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Headers
The custom duration of the session.
The impersonation.
Body
application/jsontext/json
The request.
The engine for which to create a session. This is the only property that is required to create a session.
The guest selection mode (per room or per booking).
Available options:
Default, PerRoom, PerBooking The desired display context.
Show child attributes
Show child attributes
Example:
{
"culture": "fr-FR",
"currency": "EUR",
"countryCode": "FR"
}
This represent the parameters used to configure future call to the service. It represents more or less the data entered by the final customer.
Show child attributes
Show child attributes
Example:
{
"stayPeriod": {
"arrivalDate": "2026-06-08T00:00:00Z",
"departureDate": "2026-06-13T00:00:00Z"
},
"guests": [
{
"adults": 2,
"children": 0,
"infants": 0,
"position": 1,
"memberLevel": 0
}
],
"selectedHotelId": "10133",
"selectedRoomCode": "29513",
"highlightedRateCode": "32643",
"promoCode": "DISCOUNT",
"excludeMixedRates": false,
"disableCrossSell": false,
"isMobile": false
}
Show child attributes
Show child attributes
Was this page helpful?