Create Stay Search
curl --request POST \
--url https://api.aisa.one/apis/v1/duffel/stays/search/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"check_in_date": "2023-06-04",
"check_out_date": "2023-06-07",
"guests": [
{
"type": "adult"
},
{
"age": 7,
"type": "child"
}
],
"rooms": 1,
"accommodation": {
"ids": [
"<string>"
],
"fetch_rates": false
},
"free_cancellation_only": false,
"instant_payment": false,
"location": {
"geographic_coordinates": {
"latitude": 51.5071,
"longitude": -0.1416
},
"radius": 5
},
"mobile": false,
"negotiated_rate_ids": [
"nre_0000ATOwpuYnZohiSmlmym"
]
}
}
'import requests
url = "https://api.aisa.one/apis/v1/duffel/stays/search/create"
payload = { "data": {
"check_in_date": "2023-06-04",
"check_out_date": "2023-06-07",
"guests": [
{ "type": "adult" },
{
"age": 7,
"type": "child"
}
],
"rooms": 1,
"accommodation": {
"ids": ["<string>"],
"fetch_rates": False
},
"free_cancellation_only": False,
"instant_payment": False,
"location": {
"geographic_coordinates": {
"latitude": 51.5071,
"longitude": -0.1416
},
"radius": 5
},
"mobile": False,
"negotiated_rate_ids": ["nre_0000ATOwpuYnZohiSmlmym"]
} }
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: {
check_in_date: '2023-06-04',
check_out_date: '2023-06-07',
guests: [{type: 'adult'}, {age: 7, type: 'child'}],
rooms: 1,
accommodation: {ids: ['<string>'], fetch_rates: false},
free_cancellation_only: false,
instant_payment: false,
location: {geographic_coordinates: {latitude: 51.5071, longitude: -0.1416}, radius: 5},
mobile: false,
negotiated_rate_ids: ['nre_0000ATOwpuYnZohiSmlmym']
}
})
};
fetch('https://api.aisa.one/apis/v1/duffel/stays/search/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/search/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' => [
'check_in_date' => '2023-06-04',
'check_out_date' => '2023-06-07',
'guests' => [
[
'type' => 'adult'
],
[
'age' => 7,
'type' => 'child'
]
],
'rooms' => 1,
'accommodation' => [
'ids' => [
'<string>'
],
'fetch_rates' => false
],
'free_cancellation_only' => false,
'instant_payment' => false,
'location' => [
'geographic_coordinates' => [
'latitude' => 51.5071,
'longitude' => -0.1416
],
'radius' => 5
],
'mobile' => false,
'negotiated_rate_ids' => [
'nre_0000ATOwpuYnZohiSmlmym'
]
]
]),
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/search/create"
payload := strings.NewReader("{\n \"data\": {\n \"check_in_date\": \"2023-06-04\",\n \"check_out_date\": \"2023-06-07\",\n \"guests\": [\n {\n \"type\": \"adult\"\n },\n {\n \"age\": 7,\n \"type\": \"child\"\n }\n ],\n \"rooms\": 1,\n \"accommodation\": {\n \"ids\": [\n \"<string>\"\n ],\n \"fetch_rates\": false\n },\n \"free_cancellation_only\": false,\n \"instant_payment\": false,\n \"location\": {\n \"geographic_coordinates\": {\n \"latitude\": 51.5071,\n \"longitude\": -0.1416\n },\n \"radius\": 5\n },\n \"mobile\": false,\n \"negotiated_rate_ids\": [\n \"nre_0000ATOwpuYnZohiSmlmym\"\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/search/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"check_in_date\": \"2023-06-04\",\n \"check_out_date\": \"2023-06-07\",\n \"guests\": [\n {\n \"type\": \"adult\"\n },\n {\n \"age\": 7,\n \"type\": \"child\"\n }\n ],\n \"rooms\": 1,\n \"accommodation\": {\n \"ids\": [\n \"<string>\"\n ],\n \"fetch_rates\": false\n },\n \"free_cancellation_only\": false,\n \"instant_payment\": false,\n \"location\": {\n \"geographic_coordinates\": {\n \"latitude\": 51.5071,\n \"longitude\": -0.1416\n },\n \"radius\": 5\n },\n \"mobile\": false,\n \"negotiated_rate_ids\": [\n \"nre_0000ATOwpuYnZohiSmlmym\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/duffel/stays/search/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 \"check_in_date\": \"2023-06-04\",\n \"check_out_date\": \"2023-06-07\",\n \"guests\": [\n {\n \"type\": \"adult\"\n },\n {\n \"age\": 7,\n \"type\": \"child\"\n }\n ],\n \"rooms\": 1,\n \"accommodation\": {\n \"ids\": [\n \"<string>\"\n ],\n \"fetch_rates\": false\n },\n \"free_cancellation_only\": false,\n \"instant_payment\": false,\n \"location\": {\n \"geographic_coordinates\": {\n \"latitude\": 51.5071,\n \"longitude\": -0.1416\n },\n \"radius\": 5\n },\n \"mobile\": false,\n \"negotiated_rate_ids\": [\n \"nre_0000ATOwpuYnZohiSmlmym\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"created_at": "2022-12-20T15:21:01Z",
"results": [
{
"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"
},
"cheapest_rate_base_amount": "699.00",
"cheapest_rate_base_currency": "GBP",
"cheapest_rate_currency": "GBP",
"cheapest_rate_due_at_accommodation_amount": "699.00",
"cheapest_rate_due_at_accommodation_currency": "GBP",
"cheapest_rate_public_amount": "899.00",
"cheapest_rate_public_currency": "GBP",
"cheapest_rate_total_amount": "799.00",
"check_in_date": "2023-05-24",
"check_out_date": "2023-05-28",
"expires_at": "2023-05-28T12:00:00Z",
"guests": [
{
"age": 7,
"type": "adult"
}
],
"id": "srr_0000ASVBuJVLdmqtZDJ4ca",
"rooms": 1,
"supported_negotiated_rates": [
{
"display_name": "2025 Negotiated Rate",
"id": "nre_0000AvtkNoC81yBytDM9PE"
}
]
}
]
},
"meta": {
"after": "<string>",
"before": "<string>",
"limit": 123
}
}Duffel Stays
Create Stay Search
Create Stay Search via the Duffel Stays API
<!-- aisa-pricing:start -->
Published reference price: $0.02 USD per successful request. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->
POST
https://api.aisa.one
/
apis
/
v1
/
duffel
/
stays
/
search
/
create
Create Stay Search
curl --request POST \
--url https://api.aisa.one/apis/v1/duffel/stays/search/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"check_in_date": "2023-06-04",
"check_out_date": "2023-06-07",
"guests": [
{
"type": "adult"
},
{
"age": 7,
"type": "child"
}
],
"rooms": 1,
"accommodation": {
"ids": [
"<string>"
],
"fetch_rates": false
},
"free_cancellation_only": false,
"instant_payment": false,
"location": {
"geographic_coordinates": {
"latitude": 51.5071,
"longitude": -0.1416
},
"radius": 5
},
"mobile": false,
"negotiated_rate_ids": [
"nre_0000ATOwpuYnZohiSmlmym"
]
}
}
'import requests
url = "https://api.aisa.one/apis/v1/duffel/stays/search/create"
payload = { "data": {
"check_in_date": "2023-06-04",
"check_out_date": "2023-06-07",
"guests": [
{ "type": "adult" },
{
"age": 7,
"type": "child"
}
],
"rooms": 1,
"accommodation": {
"ids": ["<string>"],
"fetch_rates": False
},
"free_cancellation_only": False,
"instant_payment": False,
"location": {
"geographic_coordinates": {
"latitude": 51.5071,
"longitude": -0.1416
},
"radius": 5
},
"mobile": False,
"negotiated_rate_ids": ["nre_0000ATOwpuYnZohiSmlmym"]
} }
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: {
check_in_date: '2023-06-04',
check_out_date: '2023-06-07',
guests: [{type: 'adult'}, {age: 7, type: 'child'}],
rooms: 1,
accommodation: {ids: ['<string>'], fetch_rates: false},
free_cancellation_only: false,
instant_payment: false,
location: {geographic_coordinates: {latitude: 51.5071, longitude: -0.1416}, radius: 5},
mobile: false,
negotiated_rate_ids: ['nre_0000ATOwpuYnZohiSmlmym']
}
})
};
fetch('https://api.aisa.one/apis/v1/duffel/stays/search/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/search/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' => [
'check_in_date' => '2023-06-04',
'check_out_date' => '2023-06-07',
'guests' => [
[
'type' => 'adult'
],
[
'age' => 7,
'type' => 'child'
]
],
'rooms' => 1,
'accommodation' => [
'ids' => [
'<string>'
],
'fetch_rates' => false
],
'free_cancellation_only' => false,
'instant_payment' => false,
'location' => [
'geographic_coordinates' => [
'latitude' => 51.5071,
'longitude' => -0.1416
],
'radius' => 5
],
'mobile' => false,
'negotiated_rate_ids' => [
'nre_0000ATOwpuYnZohiSmlmym'
]
]
]),
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/search/create"
payload := strings.NewReader("{\n \"data\": {\n \"check_in_date\": \"2023-06-04\",\n \"check_out_date\": \"2023-06-07\",\n \"guests\": [\n {\n \"type\": \"adult\"\n },\n {\n \"age\": 7,\n \"type\": \"child\"\n }\n ],\n \"rooms\": 1,\n \"accommodation\": {\n \"ids\": [\n \"<string>\"\n ],\n \"fetch_rates\": false\n },\n \"free_cancellation_only\": false,\n \"instant_payment\": false,\n \"location\": {\n \"geographic_coordinates\": {\n \"latitude\": 51.5071,\n \"longitude\": -0.1416\n },\n \"radius\": 5\n },\n \"mobile\": false,\n \"negotiated_rate_ids\": [\n \"nre_0000ATOwpuYnZohiSmlmym\"\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/search/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"check_in_date\": \"2023-06-04\",\n \"check_out_date\": \"2023-06-07\",\n \"guests\": [\n {\n \"type\": \"adult\"\n },\n {\n \"age\": 7,\n \"type\": \"child\"\n }\n ],\n \"rooms\": 1,\n \"accommodation\": {\n \"ids\": [\n \"<string>\"\n ],\n \"fetch_rates\": false\n },\n \"free_cancellation_only\": false,\n \"instant_payment\": false,\n \"location\": {\n \"geographic_coordinates\": {\n \"latitude\": 51.5071,\n \"longitude\": -0.1416\n },\n \"radius\": 5\n },\n \"mobile\": false,\n \"negotiated_rate_ids\": [\n \"nre_0000ATOwpuYnZohiSmlmym\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/duffel/stays/search/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 \"check_in_date\": \"2023-06-04\",\n \"check_out_date\": \"2023-06-07\",\n \"guests\": [\n {\n \"type\": \"adult\"\n },\n {\n \"age\": 7,\n \"type\": \"child\"\n }\n ],\n \"rooms\": 1,\n \"accommodation\": {\n \"ids\": [\n \"<string>\"\n ],\n \"fetch_rates\": false\n },\n \"free_cancellation_only\": false,\n \"instant_payment\": false,\n \"location\": {\n \"geographic_coordinates\": {\n \"latitude\": 51.5071,\n \"longitude\": -0.1416\n },\n \"radius\": 5\n },\n \"mobile\": false,\n \"negotiated_rate_ids\": [\n \"nre_0000ATOwpuYnZohiSmlmym\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"created_at": "2022-12-20T15:21:01Z",
"results": [
{
"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"
},
"cheapest_rate_base_amount": "699.00",
"cheapest_rate_base_currency": "GBP",
"cheapest_rate_currency": "GBP",
"cheapest_rate_due_at_accommodation_amount": "699.00",
"cheapest_rate_due_at_accommodation_currency": "GBP",
"cheapest_rate_public_amount": "899.00",
"cheapest_rate_public_currency": "GBP",
"cheapest_rate_total_amount": "799.00",
"check_in_date": "2023-05-24",
"check_out_date": "2023-05-28",
"expires_at": "2023-05-28T12:00:00Z",
"guests": [
{
"age": 7,
"type": "adult"
}
],
"id": "srr_0000ASVBuJVLdmqtZDJ4ca",
"rooms": 1,
"supported_negotiated_rates": [
{
"display_name": "2025 Negotiated Rate",
"id": "nre_0000AvtkNoC81yBytDM9PE"
}
]
}
]
},
"meta": {
"after": "<string>",
"before": "<string>",
"limit": 123
}
}Request contract
- Method and path: POST /apis/v1/duffel/stays/search/create
- Availability: enabled
- Request URL template: https://api.aisa.one/apis/v1/duffel/stays/search/create
- Runtime facts: 0acde870f07f2a77c4e3530faf8814f82b10ee6286c4d80ef8b1fea08763f2ee
{
"operationId": "post_duffel_stays_apis_v1_duffel_stays_search_create",
"method": "POST",
"path": "/apis/v1/duffel/stays/search/create",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"properties": {
"accommodation": {
"description": "The accommodation to search for. You must use either this object or the `location` object in your request",
"properties": {
"fetch_rates": {
"default": false,
"description": "Indicates if the accommodation search should return rooms and rates for each search result",
"example": false,
"type": "boolean"
},
"ids": {
"description": "The unique identifiers of the accommodation to search for. The maximum number of IDs is 10 when fetching room and rates, otherwise the maximum number of IDs is 200.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"ids"
],
"type": [
"object",
"null"
]
},
"check_in_date": {
"description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the guest wants to check in. Check-in date can be no more than 330 days in the future.",
"example": "2023-06-04",
"format": "date",
"type": "string"
},
"check_out_date": {
"description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the guest wants to check out. A stay can be up to 99 nights.",
"example": "2023-06-07",
"format": "date",
"type": "string"
},
"free_cancellation_only": {
"description": "Whether this search is only for rates with free cancellation available. This can affect the rates and accommodation which are returned. If this is false, or omitted, all rates will be searched for.",
"example": false,
"type": "boolean"
},
"guests": {
"description": "The list of guests travelling.",
"example": [
{
"type": "adult"
},
{
"age": 7,
"type": "child"
}
],
"items": {
"additionalProperties": false,
"properties": {
"age": {
"description": "The age of the guest at the time of booking. Required for guests of type `child`. Child age must be between 0 and 17. Do not supply an age for guests of type `adult`.",
"example": 7,
"format": "integer",
"type": [
"number",
"null"
]
},
"type": {
"description": "The type of guest. An age is required for guests with a type `child`.",
"enum": [
"child",
"adult"
],
"example": "adult",
"type": "string"
}
},
"title": "Guest",
"type": "object"
},
"type": "array"
},
"instant_payment": {
"description": "When `true`, only accommodation and rates are returned where payment is collected at the time of booking by Duffel or the source. When `false`, only rates where payment is collected by the accommodation are returned. When omitted, all rates are returned.",
"example": false,
"type": "boolean",
"x-preview": true
},
"location": {
"description": "Descriptor for an area to search for a stay. Accepts latitude-longitude paired with radius. You must use either this object or the `accommodation` object in your request",
"properties": {
"geographic_coordinates": {
"description": "The center of the search criteria's radius. Represented by an object containing latitude and longitude.",
"properties": {
"latitude": {
"description": "The latitude position of the search's center, represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -90° and 90°",
"example": 51.5071,
"format": "float",
"type": "number"
},
"longitude": {
"description": "The longitude position of the search's center, represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -180° and 180°",
"example": -0.1416,
"format": "float",
"type": "number"
}
},
"required": [
"latitude",
"longitude"
],
"type": "object"
},
"radius": {
"default": 5,
"description": "The search area's extent from the provided coordinates in kilometers. Can only be between 1 and 100. Default of 5km is subject to change.",
"example": 5,
"type": "integer"
}
},
"required": [
"geographic_coordinates"
],
"type": [
"object",
"null"
]
},
"mobile": {
"description": "Whether this search has come from a mobile device. This can affect rates and content returned for this search.",
"example": false,
"type": "boolean"
},
"negotiated_rate_ids": {
"description": "A list of [negotiated rate ids](https://duffel.com/docs/api/v2/negotiated-rates#negotiated-rates-schema-id) to perform the search with.\nWill return negotiated alongside public rates on a best effort basis for matching [accommodation ids](https://duffel.com/docs/api/v2/negotiated-rates#negotiated-rates-schema-accommodation-ids) on the negotiated rate.\n",
"example": [
"nre_0000ATOwpuYnZohiSmlmym"
],
"items": {
"type": "string"
},
"type": "array",
"x-preview": true
},
"rooms": {
"description": "The number of rooms required",
"example": 1,
"type": "integer"
}
},
"required": [
"check_in_date",
"check_out_date",
"guests",
"rooms"
],
"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": 0.02,
"estimate_source": "profile_seed",
"evidence_source": "request_snapshot"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Published reference price: $0.02 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): 0.02
- 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