Accommodation

An accommodation recorded by Duffel

amenities
listnullable

The amenities for this accommodation. This can be null when we are unable to retrieve amenity data. Accommodation amenities aid guests in identifying the accommodation that suits their needs. These are intended for programmatic use to support filtering or promoting specific accommodation attributes.

brand
objectnullable

The brand associated with the accommodation.

chain
objectnullable

The chain or group brand the accommodation is a member of

check_in_information
objectnullable

Check in and check out related information

description
stringnullable

Description of the accommodation.

Example: "Ornate quarters, some with grand pianos, in a luxurious hotel offering acclaimed dining & a spa."
email
stringnullable

The accommodation email address. This field can only be populated on the accommodation for a completed booking. Note that this data may differ from the accommodation records if it was updated directly by the accommodation after the booking was created.

Example: "reservations@duffel-hotel-group.com"
id
string

The unique ID for this accommodation. This ID stays consistent between searches — the same accommodation will always have the same ID.

Example: "acc_0000AWr2VsUNIF1Vl91xg0"
key_collection
objectnullable

The key collection details for the accommodation.

location
object

Information on the accommodation's location

name
string

The accommodation's name

Example: "Duffel Test Hotel"
phone_number
stringnullable

The accommodation phone number. This field can only be populated on the accommodation for a completed booking. This is provided directly by the accommodation and the format is not guaranteed. Note that this data may differ from the accommodation records if it was updated directly by the accommodation after the booking was created."

Example: "+442074938181"
photos
list

Photos of the accommodation

rating
numbernullable

A "star rating" of this accommodation. If available, this is an integer from 1 to 5 "stars". This value is consolidated by Duffel based on data provided by our sources and accommodation providers. For more detailed rating information, see ratings.

Example: 3
ratings
listnullable

Ratings given to an accommodation by a rating source.

This can be empty if the accommodation does not have any ratings. This can also be null if we are unable to retrieve ratings.

These are commonly represented as "stars". In Duffel Stays, they have a 1-5 scale.

They can come from multiple sources. Currently available rating sources are:

These should be displayed as "stars". While Priceline.com can add half a star to a rating, these ratings are rounded down to the nearest full star in Duffel Stays.

These should be displayed as "stars". While Booking.com can add half a star to a rating, these ratings are rounded down to the nearest full star in Duffel Stays.

These should be displayed as "stars". While Expedia can add half a star to a rating, these ratings are rounded down to the nearest full star in Duffel Stays.

These should be displayed as "diamonds".

These should be displayed as "crowns".

review_score
numbernullable

A review score of this accommodation, aggregated from guest reviews. If available, the value is a score from the 1.0-10.0 range. This value is consolidated by Duffel based on user review data from multiple sources.

Example: 8.8
rooms
list

Bookable rooms for this accommodation. A room is a single accommodation unit. It might contain multiple beds.

supported_loyalty_programme
enumnullable

The loyalty programme that is supported by the accommodation. Note that while the accommodation might support a loyalty programme in general, not all rates will. See the rate's supported_loyalty_programme property to check this on a per-rate basis.

Possible values: "wyndham_rewards", "choice_privileges", "marriott_bonvoy", "best_western_rewards", "world_of_hyatt", "hilton_honors", "ihg_one_rewards", "leaders_club", "stash_rewards", "omni_select_guest", "i_prefer", "accor_live_limitless", "my_6", "jumeirah_one", "global_hotel_alliance_discovery", or "duffel_hotel_group_rewards"

Preview

This is not yet finalised. It may change, or be removed or be not yet accessible.

An endpoint to look for accommodation suggestions. It returns a list of suggestions, which is an excerpt of the actual accommodation data.

Body parameters

location
objectnullable

This optional parameter can limit results to a given radius centered on the given coordinates

query
stringrequired

The search query for getting accommodation suggestions. Requires a minimum of three characters.

Example: "rits"

Preview

This is not yet finalised. It may change, or be removed or be not yet accessible.

Endpoint

POST https://api.duffel.com/stays/accommodation/suggestions

Request

curl -X POST --compressed "https://api.duffel.com/stays/accommodation/suggestions" \
-H "Accept-Encoding: gzip" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Duffel-Version: v2" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-d '{
"data": {
"query": "rits",
"location": {
"radius": 5,
"geographic_coordinates": {
"longitude": -0.1416,
"latitude": 51.5071
}
}
}
}'

Response

{
"data": [
{
"accommodation_name": "Duffel Test Hotel",
"accommodation_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"
}
},
"accommodation_id": "acc_0000AWr2VsUNIF1Vl91xg0"
}
]
}

Preview

This is not yet finalised. It may change, or be removed or be not yet accessible.

Returns a paginated list of accommodation for the given criteria

Query parameters

after
string

A cursor pointing to the previous page of records. For more information on how to paginate through records, see the Pagination section.

Example: "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
before
string

A cursor pointing to the next page of records. For more information on how to paginate through records, see the Pagination section.

Example: "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
limit
integer

The maximum number of records to return per page. Defaults to 50. May be set to any integer between 1 and 200. For more information on how to paginate through records, see the Pagination section.

Example: 1
Default value: 50
latitude
numberrequired

The latitude position of the search's center, represented in Decimal degrees with 6 decimal points with a range between -90° and 90°

Example: 51.5071
longitude
numberrequired

The longitude position of the search's center, represented in Decimal degrees with 6 decimal points with a range between -180° and 180°

Example: -0.1416
radius
integerrequired

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
Default value: 5

Preview

This is not yet finalised. It may change, or be removed or be not yet accessible.

Endpoint

GET https://api.duffel.com/stays/accommodation

Request

curl -X GET --compressed "https://api.duffel.com/stays/accommodation?after=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&before=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&limit=1&latitude=51.5071&longitude=-0.1416&radius=5" \
-H "Accept-Encoding: gzip" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Duffel-Version: v2" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"

Response

{
"meta": {
"limit": 50,
"after": "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
},
"data": [
{
"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,
"public_currency": "GBP",
"public_amount": "699.99",
"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",
"deal_types": [
"closed_user_group",
"mobile"
],
"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"
}
]
}
]
}

Preview

This is not yet finalised. It may change, or be removed or be not yet accessible.

Gets a specific accommodation's details.

URL parameters

id
stringrequired

The unique ID for this accommodation. This ID stays consistent between searches — the same accommodation will always have the same ID.

Example: "acc_0000AWr2VsUNIF1Vl91xg0"

Preview

This is not yet finalised. It may change, or be removed or be not yet accessible.

Endpoint

GET https://api.duffel.com/stays/accommodation/{id}

Request

curl -X GET --compressed "https://api.duffel.com/stays/accommodation/{id}" \
-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": {
"supported_loyalty_programme": "duffel_hotel_group_rewards",
"rooms": [],
"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"
}
]
}
}