Search Result

A search result is a pending availability for an accommodation on a given check in and check out dates.

accommodation
object

The accommodation associated with the search result

cheapest_rate_currency
string

The currency for cheapest_rate_total_amount for this accommodation, as an ISO 4217 currency code.

Example: "GBP"
cheapest_rate_total_amount
string

The cheapest_rate_total_amount is for search result display purposes. It is equivalent to the cheapest rate total_amount for the cheapest room at this accommodation. The rate amount is a best effort computation during the time a search is made, and can change when fetching the rates. It is not guaranteed to be accurate. It will always show a value, even when rooms data is empty in the initial Search response.

Example: "799.00"
check_in_date
date

The ISO 8601 date on which the guest wants to check in

Example: "2023-05-24"
check_out_date
date

The ISO 8601 date on which the guest wants to check out

Example: "2023-05-28"
guests
listnullable

The list of guests travelling

id
string

The ID for this search result

Example: "ssr_0000ASVBuJVLdmqtZDJ4ca"
rooms
integer

The number of rooms required

Example: 1

Returns complete room and and rate information for the selected search result for a single search result.

URL parameters

search_result_id
stringrequired

The ID of a Duffel Stay Search Result

Example: "ssr_0000ARxBI85qTkbVapZMO2"

Endpoint

POST https://api.duffel.com/stays/search_results/{search_result_id}/actions/fetch_all_rates

Request

curl -X POST --compressed "https://api.duffel.com/stays/search_results/{search_result_id}/actions/fetch_all_rates" \
-H "Accept-Encoding: gzip" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Duffel-Version: v2" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"

Response

{
"data": {
"rooms": 1,
"id": "ssr_0000ASVBuJVLdmqtZDJ4ca",
"check_out_date": "2023-05-28",
"check_in_date": "2023-05-24",
"cheapest_rate_total_amount": "799.00",
"cheapest_rate_currency": "GBP",
"accommodation": {
"supported_loyalty_programme": "duffel_hotel_group_rewards",
"rooms": [
{
"rates": [
{
"total_currency": "GBP",
"total_amount": "799.00",
"tax_currency": "GBP",
"tax_amount": "82.23",
"supported_loyalty_programme": "duffel_hotel_group_rewards",
"quantity_available": 12,
"payment_type": "pay_now",
"id": "rat_0000BTVRuKZTavzrZDJ4cb",
"fee_currency": "GBP",
"fee_amount": "50.94",
"due_at_accommodation_currency": "GBP",
"due_at_accommodation_amount": "39.95",
"conditions": [
{
"title": "Parking",
"description": "Public parking is available nearby for £15 per day"
}
],
"cancellation_timeline": [
{
"refund_amount": "799.00",
"currency": "GBP",
"before": "2023-05-23T13:00:00Z"
}
],
"board_type": "room_only",
"base_currency": "GBP",
"base_amount": "665.83",
"available_payment_methods": [
[
"balance",
"card"
]
]
}
],
"photos": [
{
"url": "https://assets.duffel.com/img/stays/image.jpg"
}
],
"name": "Double Suite",
"beds": [
{
"type": "king",
"count": 2
}
]
}
],
"review_score": 8.8,
"rating": 3,
"photos": [
{
"url": "https://assets.duffel.com/img/stays/image.jpg"
}
],
"phone_number": "+442074938181",
"name": "Duffel Test Hotel",
"location": {
"geographic_coordinates": {
"longitude": -0.1416,
"latitude": 51.5071
},
"address": {
"region": "England",
"postal_code": "EC2A 4TP",
"line_one": "100 Clifton Street",
"country_code": "GB",
"city_name": "London"
}
},
"key_collection": {
"instructions": "Please collect the keys from accommodation's reception."
},
"id": "acc_0000AWr2VsUNIF1Vl91xg0",
"email": "reservations@duffel-hotel-group.com",
"description": "Ornate quarters, some with grand pianos, in a luxurious hotel offering acclaimed dining & a spa.",
"check_in_information": {
"check_out_before_time": "11:30",
"check_in_after_time": "14:30"
},
"chain": {
"name": "Duffel Hotel Group"
},
"brand": {
"name": "Duffel Test",
"id": "bra_0000Alr8BYNsbmDMThHSbI"
},
"amenities": [
{
"type": "parking",
"description": "Parking"
}
]
}
}
}