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": {
"limit": 123,
"before": "<string>",
"after": "<string>"
}
}Duffel Stays
Create Stay Search
Create Stay Search via the Duffel Stays API
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": {
"limit": 123,
"before": "<string>",
"after": "<string>"
}
}