Accept a quote.
curl --request POST \
--url https://{apiBaseUrl}/v2/{sessionId}/quote \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"paymentType": "FullOnlinePayment",
"subscribeInsurance": true,
"customerDetails": {
"title": "Mr",
"firstName": "Roger",
"lastName": "Moore",
"countryCode": "FR",
"phoneNumber": "0612345678",
"phoneCountryCode": "+33",
"emailAddress": "rm@jb.com",
"addressLines": [
"Avenue du Général de Gaulle"
],
"cityName": "Saint Ouen L'aumône",
"postalCode": "95310",
"marketingConsent": {
"optinHotel": false,
"optinPartners": false,
"optinHotelAccepted": false,
"optinPartnersAccepted": false
}
},
"guestDetails": [],
"specialRequest": "J'exige qu'on m'offre le champagne!!!"
}
EOFconst url = 'https://{apiBaseUrl}/v2/{sessionId}/quote';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
paymentType: 'FullOnlinePayment',
subscribeInsurance: true,
customerDetails: {
title: 'Mr',
firstName: 'Roger',
lastName: 'Moore',
countryCode: 'FR',
phoneNumber: '0612345678',
phoneCountryCode: '+33',
emailAddress: 'rm@jb.com',
addressLines: ['Avenue du Général de Gaulle'],
cityName: 'Saint Ouen L\'aumône',
postalCode: '95310',
marketingConsent: {
optinHotel: false,
optinPartners: false,
optinHotelAccepted: false,
optinPartnersAccepted: false
}
},
guestDetails: [],
specialRequest: 'J\'exige qu\'on m\'offre le champagne!!!'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/{sessionId}/quote"
payload = {
"paymentType": "FullOnlinePayment",
"subscribeInsurance": True,
"customerDetails": {
"title": "Mr",
"firstName": "Roger",
"lastName": "Moore",
"countryCode": "FR",
"phoneNumber": "0612345678",
"phoneCountryCode": "+33",
"emailAddress": "rm@jb.com",
"addressLines": ["Avenue du Général de Gaulle"],
"cityName": "Saint Ouen L'aumône",
"postalCode": "95310",
"marketingConsent": {
"optinHotel": False,
"optinPartners": False,
"optinHotelAccepted": False,
"optinPartnersAccepted": False
}
},
"guestDetails": [],
"specialRequest": "J'exige qu'on m'offre le champagne!!!"
}
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/{sessionId}/quote",
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([
'paymentType' => 'FullOnlinePayment',
'subscribeInsurance' => true,
'customerDetails' => [
'title' => 'Mr',
'firstName' => 'Roger',
'lastName' => 'Moore',
'countryCode' => 'FR',
'phoneNumber' => '0612345678',
'phoneCountryCode' => '+33',
'emailAddress' => 'rm@jb.com',
'addressLines' => [
'Avenue du Général de Gaulle'
],
'cityName' => 'Saint Ouen L\'aumône',
'postalCode' => '95310',
'marketingConsent' => [
'optinHotel' => false,
'optinPartners' => false,
'optinHotelAccepted' => false,
'optinPartnersAccepted' => false
]
],
'guestDetails' => [
],
'specialRequest' => 'J\'exige qu\'on m\'offre le champagne!!!'
]),
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/{sessionId}/quote");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"paymentType\": \"FullOnlinePayment\",\n \"subscribeInsurance\": true,\n \"customerDetails\": {\n \"title\": \"Mr\",\n \"firstName\": \"Roger\",\n \"lastName\": \"Moore\",\n \"countryCode\": \"FR\",\n \"phoneNumber\": \"0612345678\",\n \"phoneCountryCode\": \"+33\",\n \"emailAddress\": \"rm@jb.com\",\n \"addressLines\": [\n \"Avenue du Général de Gaulle\"\n ],\n \"cityName\": \"Saint Ouen L'aumône\",\n \"postalCode\": \"95310\",\n \"marketingConsent\": {\n \"optinHotel\": false,\n \"optinPartners\": false,\n \"optinHotelAccepted\": false,\n \"optinPartnersAccepted\": false\n }\n },\n \"guestDetails\": [],\n \"specialRequest\": \"J'exige qu'on m'offre le champagne!!!\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/v2/{sessionId}/quote")
.header("Content-Type", "application/json")
.body("{\n \"paymentType\": \"FullOnlinePayment\",\n \"subscribeInsurance\": true,\n \"customerDetails\": {\n \"title\": \"Mr\",\n \"firstName\": \"Roger\",\n \"lastName\": \"Moore\",\n \"countryCode\": \"FR\",\n \"phoneNumber\": \"0612345678\",\n \"phoneCountryCode\": \"+33\",\n \"emailAddress\": \"rm@jb.com\",\n \"addressLines\": [\n \"Avenue du Général de Gaulle\"\n ],\n \"cityName\": \"Saint Ouen L'aumône\",\n \"postalCode\": \"95310\",\n \"marketingConsent\": {\n \"optinHotel\": false,\n \"optinPartners\": false,\n \"optinHotelAccepted\": false,\n \"optinPartnersAccepted\": false\n }\n },\n \"guestDetails\": [],\n \"specialRequest\": \"J'exige qu'on m'offre le champagne!!!\"\n}")
.asString();{
"redirectionUrl": "<string>"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Basket
Accept a quote
Accept a quote
POST
/
v2
/
{sessionId}
/
quote
Accept a quote.
curl --request POST \
--url https://{apiBaseUrl}/v2/{sessionId}/quote \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"paymentType": "FullOnlinePayment",
"subscribeInsurance": true,
"customerDetails": {
"title": "Mr",
"firstName": "Roger",
"lastName": "Moore",
"countryCode": "FR",
"phoneNumber": "0612345678",
"phoneCountryCode": "+33",
"emailAddress": "rm@jb.com",
"addressLines": [
"Avenue du Général de Gaulle"
],
"cityName": "Saint Ouen L'aumône",
"postalCode": "95310",
"marketingConsent": {
"optinHotel": false,
"optinPartners": false,
"optinHotelAccepted": false,
"optinPartnersAccepted": false
}
},
"guestDetails": [],
"specialRequest": "J'exige qu'on m'offre le champagne!!!"
}
EOFconst url = 'https://{apiBaseUrl}/v2/{sessionId}/quote';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
paymentType: 'FullOnlinePayment',
subscribeInsurance: true,
customerDetails: {
title: 'Mr',
firstName: 'Roger',
lastName: 'Moore',
countryCode: 'FR',
phoneNumber: '0612345678',
phoneCountryCode: '+33',
emailAddress: 'rm@jb.com',
addressLines: ['Avenue du Général de Gaulle'],
cityName: 'Saint Ouen L\'aumône',
postalCode: '95310',
marketingConsent: {
optinHotel: false,
optinPartners: false,
optinHotelAccepted: false,
optinPartnersAccepted: false
}
},
guestDetails: [],
specialRequest: 'J\'exige qu\'on m\'offre le champagne!!!'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v2/{sessionId}/quote"
payload = {
"paymentType": "FullOnlinePayment",
"subscribeInsurance": True,
"customerDetails": {
"title": "Mr",
"firstName": "Roger",
"lastName": "Moore",
"countryCode": "FR",
"phoneNumber": "0612345678",
"phoneCountryCode": "+33",
"emailAddress": "rm@jb.com",
"addressLines": ["Avenue du Général de Gaulle"],
"cityName": "Saint Ouen L'aumône",
"postalCode": "95310",
"marketingConsent": {
"optinHotel": False,
"optinPartners": False,
"optinHotelAccepted": False,
"optinPartnersAccepted": False
}
},
"guestDetails": [],
"specialRequest": "J'exige qu'on m'offre le champagne!!!"
}
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/{sessionId}/quote",
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([
'paymentType' => 'FullOnlinePayment',
'subscribeInsurance' => true,
'customerDetails' => [
'title' => 'Mr',
'firstName' => 'Roger',
'lastName' => 'Moore',
'countryCode' => 'FR',
'phoneNumber' => '0612345678',
'phoneCountryCode' => '+33',
'emailAddress' => 'rm@jb.com',
'addressLines' => [
'Avenue du Général de Gaulle'
],
'cityName' => 'Saint Ouen L\'aumône',
'postalCode' => '95310',
'marketingConsent' => [
'optinHotel' => false,
'optinPartners' => false,
'optinHotelAccepted' => false,
'optinPartnersAccepted' => false
]
],
'guestDetails' => [
],
'specialRequest' => 'J\'exige qu\'on m\'offre le champagne!!!'
]),
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/{sessionId}/quote");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"paymentType\": \"FullOnlinePayment\",\n \"subscribeInsurance\": true,\n \"customerDetails\": {\n \"title\": \"Mr\",\n \"firstName\": \"Roger\",\n \"lastName\": \"Moore\",\n \"countryCode\": \"FR\",\n \"phoneNumber\": \"0612345678\",\n \"phoneCountryCode\": \"+33\",\n \"emailAddress\": \"rm@jb.com\",\n \"addressLines\": [\n \"Avenue du Général de Gaulle\"\n ],\n \"cityName\": \"Saint Ouen L'aumône\",\n \"postalCode\": \"95310\",\n \"marketingConsent\": {\n \"optinHotel\": false,\n \"optinPartners\": false,\n \"optinHotelAccepted\": false,\n \"optinPartnersAccepted\": false\n }\n },\n \"guestDetails\": [],\n \"specialRequest\": \"J'exige qu'on m'offre le champagne!!!\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/v2/{sessionId}/quote")
.header("Content-Type", "application/json")
.body("{\n \"paymentType\": \"FullOnlinePayment\",\n \"subscribeInsurance\": true,\n \"customerDetails\": {\n \"title\": \"Mr\",\n \"firstName\": \"Roger\",\n \"lastName\": \"Moore\",\n \"countryCode\": \"FR\",\n \"phoneNumber\": \"0612345678\",\n \"phoneCountryCode\": \"+33\",\n \"emailAddress\": \"rm@jb.com\",\n \"addressLines\": [\n \"Avenue du Général de Gaulle\"\n ],\n \"cityName\": \"Saint Ouen L'aumône\",\n \"postalCode\": \"95310\",\n \"marketingConsent\": {\n \"optinHotel\": false,\n \"optinPartners\": false,\n \"optinHotelAccepted\": false,\n \"optinPartnersAccepted\": false\n }\n },\n \"guestDetails\": [],\n \"specialRequest\": \"J'exige qu'on m'offre le champagne!!!\"\n}")
.asString();{
"redirectionUrl": "<string>"
}{
"code": "InvalidUserAuthentication",
"message": "<string>"
}Path Parameters
Body
application/jsontext/json
The payment type chose by the end user. It must have been proposed by the accept quote in a previous request.
Available options:
DefaultDeposit, FullOnlinePayment, CallOption, WireTransfer, PaymentHubRedirection True if the end user had chosen to subscribe to the proposed insurance.
Details of the customer (i.e. the end user which pay the booking).
Show child attributes
Show child attributes
Details of the guests (i.e. the people which will stay at the hotel).
Show child attributes
Show child attributes
The payment name chose by the end user. It must have been proposed by the accept quote in a previous request.
Customer desires.
Loyalty information of the partner used and customer.
Show child attributes
Show child attributes
Response
OK
The redirect url to send to the browser for the end of the booking process.
Was this page helpful?