Search hotel availability and create a hotel (accommodation) booking using the Duffel Stays API.
domain: duffel.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Request Duffel Stays access (via duffel.com/contact-us) and create a test access token from the Duffel dashboard, since Stays isn't enabled by default the way Flights is.
Call POST /stays/search (duffel.stays.search) with rooms, a guests array (e.g. {type: "adult"}), check_in_date, check_out_date, and a location object (geographic_coordinates lat/long + radius in km) or specific accommodation IDs.
From the search response, pick the desired accommodation and note its search_result_id, then call POST /stays/search_results/{id}/actions/fetch_all_rates to retrieve every room and rate_id available for it.
Call POST /stays/quotes with the chosen rate_id to reconfirm the rate is still available and lock in a final price, receiving a quote_id back.
Call POST /stays/bookings with the quote_id, guest details (given_name, family_name, born_on), email, and phone_number to create the booking.
Handle the response: 201 returns the full booking immediately; 200/202 means the booking is still being confirmed with the supplier — listen for the stays.booking.created (or stays.booking_creation_failed) webhook rather than retrying the create-booking call.
Known gotchas
Duffel Stays access must be explicitly requested and enabled for your account before the /stays endpoints work — it isn't available by default alongside Flights.
Rates can go stale between search and booking; always create a quote first (POST /stays/quotes) — booking directly off a rate_id without quoting risks a rate_unavailable error at booking time.
Create Booking can legitimately return 200 or 202 (not just 201); Duffel explicitly warns you should not retry the request in these cases, since retrying may produce a duplicate booking.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?