Create Stay Booking
curl --request POST \
--url https://api.aisa.one/apis/v1/duffel/stays/bookings/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"email": "amelia.earheart@duffel.com",
"guests": [
{
"family_name": "Earheart",
"given_name": "Amelia",
"user_id": "icu_00009htyDGjIfajdNBZRlw"
}
],
"phone_number": "+442080160509",
"quote_id": "quo_0000AS0NZdKjjnnHZmSUbI",
"accommodation_special_requests": "2:00 PM early check-in required",
"loyalty_programme_account_number": "201154908",
"metadata": {
"customer_reference_number": "DLXYYZ5"
},
"payment": {
"three_d_secure_session_id": "3ds_0000AWr2XsTRIF1Vp34gh5"
},
"users": [
"icu_00009htyDGjIfajdNBZRlw"
]
}
}
'import requests
url = "https://api.aisa.one/apis/v1/duffel/stays/bookings/create"
payload = { "data": {
"email": "amelia.earheart@duffel.com",
"guests": [
{
"family_name": "Earheart",
"given_name": "Amelia",
"user_id": "icu_00009htyDGjIfajdNBZRlw"
}
],
"phone_number": "+442080160509",
"quote_id": "quo_0000AS0NZdKjjnnHZmSUbI",
"accommodation_special_requests": "2:00 PM early check-in required",
"loyalty_programme_account_number": "201154908",
"metadata": { "customer_reference_number": "DLXYYZ5" },
"payment": { "three_d_secure_session_id": "3ds_0000AWr2XsTRIF1Vp34gh5" },
"users": ["icu_00009htyDGjIfajdNBZRlw"]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
email: 'amelia.earheart@duffel.com',
guests: [
{
family_name: 'Earheart',
given_name: 'Amelia',
user_id: 'icu_00009htyDGjIfajdNBZRlw'
}
],
phone_number: '+442080160509',
quote_id: 'quo_0000AS0NZdKjjnnHZmSUbI',
accommodation_special_requests: '2:00 PM early check-in required',
loyalty_programme_account_number: '201154908',
metadata: {customer_reference_number: 'DLXYYZ5'},
payment: {three_d_secure_session_id: '3ds_0000AWr2XsTRIF1Vp34gh5'},
users: ['icu_00009htyDGjIfajdNBZRlw']
}
})
};
fetch('https://api.aisa.one/apis/v1/duffel/stays/bookings/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/duffel/stays/bookings/create",
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([
'data' => [
'email' => 'amelia.earheart@duffel.com',
'guests' => [
[
'family_name' => 'Earheart',
'given_name' => 'Amelia',
'user_id' => 'icu_00009htyDGjIfajdNBZRlw'
]
],
'phone_number' => '+442080160509',
'quote_id' => 'quo_0000AS0NZdKjjnnHZmSUbI',
'accommodation_special_requests' => '2:00 PM early check-in required',
'loyalty_programme_account_number' => '201154908',
'metadata' => [
'customer_reference_number' => 'DLXYYZ5'
],
'payment' => [
'three_d_secure_session_id' => '3ds_0000AWr2XsTRIF1Vp34gh5'
],
'users' => [
'icu_00009htyDGjIfajdNBZRlw'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/duffel/stays/bookings/create"
payload := strings.NewReader("{\n \"data\": {\n \"email\": \"amelia.earheart@duffel.com\",\n \"guests\": [\n {\n \"family_name\": \"Earheart\",\n \"given_name\": \"Amelia\",\n \"user_id\": \"icu_00009htyDGjIfajdNBZRlw\"\n }\n ],\n \"phone_number\": \"+442080160509\",\n \"quote_id\": \"quo_0000AS0NZdKjjnnHZmSUbI\",\n \"accommodation_special_requests\": \"2:00 PM early check-in required\",\n \"loyalty_programme_account_number\": \"201154908\",\n \"metadata\": {\n \"customer_reference_number\": \"DLXYYZ5\"\n },\n \"payment\": {\n \"three_d_secure_session_id\": \"3ds_0000AWr2XsTRIF1Vp34gh5\"\n },\n \"users\": [\n \"icu_00009htyDGjIfajdNBZRlw\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/duffel/stays/bookings/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"email\": \"amelia.earheart@duffel.com\",\n \"guests\": [\n {\n \"family_name\": \"Earheart\",\n \"given_name\": \"Amelia\",\n \"user_id\": \"icu_00009htyDGjIfajdNBZRlw\"\n }\n ],\n \"phone_number\": \"+442080160509\",\n \"quote_id\": \"quo_0000AS0NZdKjjnnHZmSUbI\",\n \"accommodation_special_requests\": \"2:00 PM early check-in required\",\n \"loyalty_programme_account_number\": \"201154908\",\n \"metadata\": {\n \"customer_reference_number\": \"DLXYYZ5\"\n },\n \"payment\": {\n \"three_d_secure_session_id\": \"3ds_0000AWr2XsTRIF1Vp34gh5\"\n },\n \"users\": [\n \"icu_00009htyDGjIfajdNBZRlw\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/duffel/stays/bookings/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"email\": \"amelia.earheart@duffel.com\",\n \"guests\": [\n {\n \"family_name\": \"Earheart\",\n \"given_name\": \"Amelia\",\n \"user_id\": \"icu_00009htyDGjIfajdNBZRlw\"\n }\n ],\n \"phone_number\": \"+442080160509\",\n \"quote_id\": \"quo_0000AS0NZdKjjnnHZmSUbI\",\n \"accommodation_special_requests\": \"2:00 PM early check-in required\",\n \"loyalty_programme_account_number\": \"201154908\",\n \"metadata\": {\n \"customer_reference_number\": \"DLXYYZ5\"\n },\n \"payment\": {\n \"three_d_secure_session_id\": \"3ds_0000AWr2XsTRIF1Vp34gh5\"\n },\n \"users\": [\n \"icu_00009htyDGjIfajdNBZRlw\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"accommodation": {
"amenities": [
{
"description": "Parking",
"type": "parking"
}
],
"brand": {
"id": "bra_0000Alr8BYNsbmDMThHSbI",
"name": "Duffel Test"
},
"chain": {
"id": "chn_0000Alr8BYNsbmDMThHSbI",
"name": "Accor Hotels"
},
"check_in_information": {
"check_in_after_time": "14:30",
"check_in_before_time": "00:00",
"check_out_before_time": "11:30"
},
"description": "Ornate quarters, some with grand pianos, in a luxurious hotel offering acclaimed dining & a spa.",
"email": "reservations@duffel-hotel-group.com",
"id": "acc_0000AWr2VsUNIF1Vl91xg0",
"key_collection": {
"instructions": "Please collect the keys from accommodation's reception."
},
"location": {
"address": {
"city_name": "London",
"country_code": "GB",
"line_one": "100 Clifton Street",
"postal_code": "EC2A 4TP",
"region": "England"
},
"geographic_coordinates": {
"latitude": 51.5071,
"longitude": -0.1416
}
},
"name": "Duffel Test Hotel",
"payment_instruction_supported": false,
"phone_number": "+442074938181",
"photos": [
{
"url": "https://assets.duffel.com/img/stays/image.jpg"
}
],
"rating": 3,
"ratings": [
{
"source": "priceline",
"value": 1
}
],
"review_count": 336,
"review_score": 8.8,
"rooms": [
{
"beds": [
{
"count": 2,
"type": "king"
}
],
"name": "Double Suite",
"photos": [
{
"url": "https://assets.duffel.com/img/stays/image.jpg"
}
],
"rates": [
{
"available_payment_methods": [
[
"balance"
]
],
"base_amount": "665.83",
"base_currency": "GBP",
"benefits": [
{
"description": "Daily full breakfast for up to two guests, served in the restaurant.",
"title": "Daily breakfast",
"type": "breakfast_included"
}
],
"board_type": "room_only",
"cancellation_timeline": [
{
"before": "2023-05-23T13:00:00Z",
"currency": "GBP",
"refund_amount": "799.00"
}
],
"code": "ABC",
"conditions": [
{
"description": "Public parking is available nearby for £15 per day",
"title": "Parking"
}
],
"deal_types": [
"closed_user_group",
"corporate",
"mobile"
],
"description": "Complimentary Breakfast 2Ppl, 100Usd Htl Crdt Person Stay Or Lcl Curr Equiv Or 100 Fb Crdt, Nxt Cat Upgrd Subj To Available.",
"due_at_accommodation_amount": "39.95",
"due_at_accommodation_currency": "GBP",
"estimated_commission_amount": "100.00",
"estimated_commission_currency": "GBP",
"expires_at": "2023-05-28T12:00:00Z",
"fee_amount": "50.94",
"fee_currency": "GBP",
"id": "rat_0000BTVRuKZTavzrZDJ4cb",
"loyalty_programme_required": false,
"name": "Best Available Rate",
"negotiated_rate_id": "nre_0000ATOwpuYnZohiSmlmyz",
"payment_instruction_allowed": true,
"payment_type": "pay_now",
"public_amount": "699.99",
"public_currency": "GBP",
"quantity_available": 12,
"source": "sabre",
"supported_loyalty_programme": "duffel_hotel_group_rewards",
"tax_amount": "82.23",
"tax_currency": "GBP",
"total_amount": "799.00",
"total_currency": "GBP"
}
]
}
],
"supported_loyalty_programme": "duffel_hotel_group_rewards"
},
"cancelled_at": null,
"check_in_date": "2023-05-24",
"check_out_date": "2023-05-28",
"confirmed_at": "2023-04-13T15:48:11.642Z",
"deposit_amount": "109.99",
"deposit_currency": "GBP",
"email": "amelia.earheart@duffel.com",
"estimated_commission_amount": "100.00",
"estimated_commission_currency": "GBP",
"guest_types": [
{
"age": 7,
"type": "adult"
}
],
"guests": [
{
"family_name": "Earhart",
"given_name": "Amelia",
"user_id": "icu_00009htyDGjIfajdNBZRlw"
}
],
"id": "bok_0000BTVRuKZTavzrZDJ4cb",
"loyalty_programme_account_number": "201154908",
"metadata": {
"checkout_reference": "usr_0000AePJGl5G9ZYfmNllrs"
},
"phone_number": "+442080160509",
"reference": "AFE33SE2",
"rooms": 1,
"status": "confirmed",
"supported_loyalty_programme": "duffel_hotel_group_rewards",
"users": [
"icu_00009htyDGjIfajdNBZRlw"
]
},
"meta": {
"after": "<string>",
"before": "<string>",
"limit": 123
}
}Duffel Stays
Create Stay Booking
Create Stay Booking via the Duffel Stays API
<!-- aisa-pricing:start -->
Published reference price: $2 USD per successful request. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->
POST
https://api.aisa.one
/
apis
/
v1
/
duffel
/
stays
/
bookings
/
create
Create Stay Booking
curl --request POST \
--url https://api.aisa.one/apis/v1/duffel/stays/bookings/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"email": "amelia.earheart@duffel.com",
"guests": [
{
"family_name": "Earheart",
"given_name": "Amelia",
"user_id": "icu_00009htyDGjIfajdNBZRlw"
}
],
"phone_number": "+442080160509",
"quote_id": "quo_0000AS0NZdKjjnnHZmSUbI",
"accommodation_special_requests": "2:00 PM early check-in required",
"loyalty_programme_account_number": "201154908",
"metadata": {
"customer_reference_number": "DLXYYZ5"
},
"payment": {
"three_d_secure_session_id": "3ds_0000AWr2XsTRIF1Vp34gh5"
},
"users": [
"icu_00009htyDGjIfajdNBZRlw"
]
}
}
'import requests
url = "https://api.aisa.one/apis/v1/duffel/stays/bookings/create"
payload = { "data": {
"email": "amelia.earheart@duffel.com",
"guests": [
{
"family_name": "Earheart",
"given_name": "Amelia",
"user_id": "icu_00009htyDGjIfajdNBZRlw"
}
],
"phone_number": "+442080160509",
"quote_id": "quo_0000AS0NZdKjjnnHZmSUbI",
"accommodation_special_requests": "2:00 PM early check-in required",
"loyalty_programme_account_number": "201154908",
"metadata": { "customer_reference_number": "DLXYYZ5" },
"payment": { "three_d_secure_session_id": "3ds_0000AWr2XsTRIF1Vp34gh5" },
"users": ["icu_00009htyDGjIfajdNBZRlw"]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
email: 'amelia.earheart@duffel.com',
guests: [
{
family_name: 'Earheart',
given_name: 'Amelia',
user_id: 'icu_00009htyDGjIfajdNBZRlw'
}
],
phone_number: '+442080160509',
quote_id: 'quo_0000AS0NZdKjjnnHZmSUbI',
accommodation_special_requests: '2:00 PM early check-in required',
loyalty_programme_account_number: '201154908',
metadata: {customer_reference_number: 'DLXYYZ5'},
payment: {three_d_secure_session_id: '3ds_0000AWr2XsTRIF1Vp34gh5'},
users: ['icu_00009htyDGjIfajdNBZRlw']
}
})
};
fetch('https://api.aisa.one/apis/v1/duffel/stays/bookings/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/duffel/stays/bookings/create",
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([
'data' => [
'email' => 'amelia.earheart@duffel.com',
'guests' => [
[
'family_name' => 'Earheart',
'given_name' => 'Amelia',
'user_id' => 'icu_00009htyDGjIfajdNBZRlw'
]
],
'phone_number' => '+442080160509',
'quote_id' => 'quo_0000AS0NZdKjjnnHZmSUbI',
'accommodation_special_requests' => '2:00 PM early check-in required',
'loyalty_programme_account_number' => '201154908',
'metadata' => [
'customer_reference_number' => 'DLXYYZ5'
],
'payment' => [
'three_d_secure_session_id' => '3ds_0000AWr2XsTRIF1Vp34gh5'
],
'users' => [
'icu_00009htyDGjIfajdNBZRlw'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/duffel/stays/bookings/create"
payload := strings.NewReader("{\n \"data\": {\n \"email\": \"amelia.earheart@duffel.com\",\n \"guests\": [\n {\n \"family_name\": \"Earheart\",\n \"given_name\": \"Amelia\",\n \"user_id\": \"icu_00009htyDGjIfajdNBZRlw\"\n }\n ],\n \"phone_number\": \"+442080160509\",\n \"quote_id\": \"quo_0000AS0NZdKjjnnHZmSUbI\",\n \"accommodation_special_requests\": \"2:00 PM early check-in required\",\n \"loyalty_programme_account_number\": \"201154908\",\n \"metadata\": {\n \"customer_reference_number\": \"DLXYYZ5\"\n },\n \"payment\": {\n \"three_d_secure_session_id\": \"3ds_0000AWr2XsTRIF1Vp34gh5\"\n },\n \"users\": [\n \"icu_00009htyDGjIfajdNBZRlw\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/duffel/stays/bookings/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"email\": \"amelia.earheart@duffel.com\",\n \"guests\": [\n {\n \"family_name\": \"Earheart\",\n \"given_name\": \"Amelia\",\n \"user_id\": \"icu_00009htyDGjIfajdNBZRlw\"\n }\n ],\n \"phone_number\": \"+442080160509\",\n \"quote_id\": \"quo_0000AS0NZdKjjnnHZmSUbI\",\n \"accommodation_special_requests\": \"2:00 PM early check-in required\",\n \"loyalty_programme_account_number\": \"201154908\",\n \"metadata\": {\n \"customer_reference_number\": \"DLXYYZ5\"\n },\n \"payment\": {\n \"three_d_secure_session_id\": \"3ds_0000AWr2XsTRIF1Vp34gh5\"\n },\n \"users\": [\n \"icu_00009htyDGjIfajdNBZRlw\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/duffel/stays/bookings/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"email\": \"amelia.earheart@duffel.com\",\n \"guests\": [\n {\n \"family_name\": \"Earheart\",\n \"given_name\": \"Amelia\",\n \"user_id\": \"icu_00009htyDGjIfajdNBZRlw\"\n }\n ],\n \"phone_number\": \"+442080160509\",\n \"quote_id\": \"quo_0000AS0NZdKjjnnHZmSUbI\",\n \"accommodation_special_requests\": \"2:00 PM early check-in required\",\n \"loyalty_programme_account_number\": \"201154908\",\n \"metadata\": {\n \"customer_reference_number\": \"DLXYYZ5\"\n },\n \"payment\": {\n \"three_d_secure_session_id\": \"3ds_0000AWr2XsTRIF1Vp34gh5\"\n },\n \"users\": [\n \"icu_00009htyDGjIfajdNBZRlw\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"accommodation": {
"amenities": [
{
"description": "Parking",
"type": "parking"
}
],
"brand": {
"id": "bra_0000Alr8BYNsbmDMThHSbI",
"name": "Duffel Test"
},
"chain": {
"id": "chn_0000Alr8BYNsbmDMThHSbI",
"name": "Accor Hotels"
},
"check_in_information": {
"check_in_after_time": "14:30",
"check_in_before_time": "00:00",
"check_out_before_time": "11:30"
},
"description": "Ornate quarters, some with grand pianos, in a luxurious hotel offering acclaimed dining & a spa.",
"email": "reservations@duffel-hotel-group.com",
"id": "acc_0000AWr2VsUNIF1Vl91xg0",
"key_collection": {
"instructions": "Please collect the keys from accommodation's reception."
},
"location": {
"address": {
"city_name": "London",
"country_code": "GB",
"line_one": "100 Clifton Street",
"postal_code": "EC2A 4TP",
"region": "England"
},
"geographic_coordinates": {
"latitude": 51.5071,
"longitude": -0.1416
}
},
"name": "Duffel Test Hotel",
"payment_instruction_supported": false,
"phone_number": "+442074938181",
"photos": [
{
"url": "https://assets.duffel.com/img/stays/image.jpg"
}
],
"rating": 3,
"ratings": [
{
"source": "priceline",
"value": 1
}
],
"review_count": 336,
"review_score": 8.8,
"rooms": [
{
"beds": [
{
"count": 2,
"type": "king"
}
],
"name": "Double Suite",
"photos": [
{
"url": "https://assets.duffel.com/img/stays/image.jpg"
}
],
"rates": [
{
"available_payment_methods": [
[
"balance"
]
],
"base_amount": "665.83",
"base_currency": "GBP",
"benefits": [
{
"description": "Daily full breakfast for up to two guests, served in the restaurant.",
"title": "Daily breakfast",
"type": "breakfast_included"
}
],
"board_type": "room_only",
"cancellation_timeline": [
{
"before": "2023-05-23T13:00:00Z",
"currency": "GBP",
"refund_amount": "799.00"
}
],
"code": "ABC",
"conditions": [
{
"description": "Public parking is available nearby for £15 per day",
"title": "Parking"
}
],
"deal_types": [
"closed_user_group",
"corporate",
"mobile"
],
"description": "Complimentary Breakfast 2Ppl, 100Usd Htl Crdt Person Stay Or Lcl Curr Equiv Or 100 Fb Crdt, Nxt Cat Upgrd Subj To Available.",
"due_at_accommodation_amount": "39.95",
"due_at_accommodation_currency": "GBP",
"estimated_commission_amount": "100.00",
"estimated_commission_currency": "GBP",
"expires_at": "2023-05-28T12:00:00Z",
"fee_amount": "50.94",
"fee_currency": "GBP",
"id": "rat_0000BTVRuKZTavzrZDJ4cb",
"loyalty_programme_required": false,
"name": "Best Available Rate",
"negotiated_rate_id": "nre_0000ATOwpuYnZohiSmlmyz",
"payment_instruction_allowed": true,
"payment_type": "pay_now",
"public_amount": "699.99",
"public_currency": "GBP",
"quantity_available": 12,
"source": "sabre",
"supported_loyalty_programme": "duffel_hotel_group_rewards",
"tax_amount": "82.23",
"tax_currency": "GBP",
"total_amount": "799.00",
"total_currency": "GBP"
}
]
}
],
"supported_loyalty_programme": "duffel_hotel_group_rewards"
},
"cancelled_at": null,
"check_in_date": "2023-05-24",
"check_out_date": "2023-05-28",
"confirmed_at": "2023-04-13T15:48:11.642Z",
"deposit_amount": "109.99",
"deposit_currency": "GBP",
"email": "amelia.earheart@duffel.com",
"estimated_commission_amount": "100.00",
"estimated_commission_currency": "GBP",
"guest_types": [
{
"age": 7,
"type": "adult"
}
],
"guests": [
{
"family_name": "Earhart",
"given_name": "Amelia",
"user_id": "icu_00009htyDGjIfajdNBZRlw"
}
],
"id": "bok_0000BTVRuKZTavzrZDJ4cb",
"loyalty_programme_account_number": "201154908",
"metadata": {
"checkout_reference": "usr_0000AePJGl5G9ZYfmNllrs"
},
"phone_number": "+442080160509",
"reference": "AFE33SE2",
"rooms": 1,
"status": "confirmed",
"supported_loyalty_programme": "duffel_hotel_group_rewards",
"users": [
"icu_00009htyDGjIfajdNBZRlw"
]
},
"meta": {
"after": "<string>",
"before": "<string>",
"limit": 123
}
}Request contract
- Method and path: POST /apis/v1/duffel/stays/bookings/create
- Availability: enabled
- Request URL template: https://api.aisa.one/apis/v1/duffel/stays/bookings/create
- Runtime facts: 0acde870f07f2a77c4e3530faf8814f82b10ee6286c4d80ef8b1fea08763f2ee
{
"operationId": "post_duffel_stays_apis_v1_duffel_stays_bookings_create",
"method": "POST",
"path": "/apis/v1/duffel/stays/bookings/create",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"properties": {
"accommodation_special_requests": {
"description": "Guest's specific requests about this booking to be forwarded to the accommodation. This field should not be used to provide medical or otherwise sensitive information.",
"example": "2:00 PM early check-in required",
"maxLength": 1000,
"type": [
"string",
"null"
]
},
"email": {
"description": "Lead guest's email address",
"example": "amelia.earheart@duffel.com",
"format": "email",
"type": "string"
},
"guests": {
"description": "List of guests that will stay on this booking. A minimum of one guest must be provided.\nFor bookings of more than one room, the reservation will be made under the name of the first guest provided. We recommend (though optional) that you pass an additional guest name per additional room.\n",
"items": {
"properties": {
"family_name": {
"description": "Guest's family name",
"example": "Earheart",
"type": "string"
},
"given_name": {
"description": "Guest's given name",
"example": "Amelia",
"type": "string"
},
"user_id": {
"description": "Creates an association between the guest and a previously created user.\n\nThis is intended to allow guests the ability to manage their own bookings.\n",
"example": "icu_00009htyDGjIfajdNBZRlw",
"type": [
"string",
"null"
]
}
},
"required": [
"given_name",
"family_name"
],
"type": "object"
},
"type": "array"
},
"loyalty_programme_account_number": {
"description": "Loyalty programme account number to associate with this booking.\n\nUse this only when the quote has a [supported_loyalty_programme](/docs/api/v2/quotes/create-quote#quotes-schema-supported-loyalty-programme) indicated. Otherwise, this will result in an error.\n\nAccount number is relayed to the hotel on a best-effort basis, it is at the hotel's discretion to honour the loyalty programme.\n",
"example": "201154908",
"type": [
"string",
"null"
]
},
"metadata": {
"description": "Metadata contains a set of key-value pairs that you can attach to an\nobject. It can be useful for storing additional information about the\nobject, in a structured format. Duffel does not use this information.\nYou should not store sensitive information in this field.\n\nThe metadata is a collection of key-value pairs, both of which are strings.\nYou can store a maximum of 50 key-value pairs, where each key has a maximum\nlength of 40 characters and each value has a maximum length of 500 characters.\n\nKeys must only contain numbers, letters, dashes, or underscores.\n",
"example": {
"customer_reference_number": "DLXYYZ5"
},
"type": [
"object",
"null"
]
},
"payment": {
"description": "The payment details to use to pay for the booking.\n\nWhen you want to pay using the \"balance\" payment method, this must be omitted.\n\nWhen you want to pay using the \"card\" payment method, this object is required.\n",
"properties": {
"three_d_secure_session_id": {
"description": "The ID of the ThreeDSecureSession",
"example": "3ds_0000AWr2XsTRIF1Vp34gh5",
"type": "string"
}
},
"type": [
"object",
"null"
]
},
"phone_number": {
"description": "Lead guest's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) (international) format.",
"example": "+442080160509",
"type": "string"
},
"quote_id": {
"description": "The `id` of the stay quote you want to book.",
"example": "quo_0000AS0NZdKjjnnHZmSUbI",
"type": "string"
},
"users": {
"description": "The `id`s of customer users that would be allowed to manage the booking.\n",
"items": {
"example": "icu_00009htyDGjIfajdNBZRlw",
"type": "string"
},
"type": "array"
}
},
"required": [
"quote_id",
"guests",
"email",
"phone_number"
],
"title": "Body parameters",
"type": "object"
}
},
"required": [
"data"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "explicit_zero",
"customer_pricing": "fixed_success",
"default_request_estimate_usd": 2.0,
"estimate_source": "profile_seed",
"evidence_source": "request_snapshot"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Published reference price: $2 USD per successful request. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 2.0
- Cost contract: explicit_zero
- Settlement evidence source: request_snapshot
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes