Duffel Stays

Number of APIs: 10

This collection is designed to pair with our Getting Started with Stays integration guide to walk you through how to integrate our search and book accommodation flow into your own product.

In order to follow this guide, you'll need to:

  • Sign up for a Duffel Account (it takes about 1 minute!)
  • Create a test token from the Access Tokens page in your Dashboard and paste it in the Authorization section of the Qodex Collection (Don't forget to hit save afterwards)

Our requests have a pre-defined sequence to replicate creating a booking in a real world scenario:

  • Searching for accommodation
  • Selecting an accommodation from the previous search to see available rates
  • Creating a quote to confirm rate & availability
  • Creating a booking from the selected quote

NOTE: By running the requests in the sequence mentioned above, you'll get most fields automatically pre-filled for you.

  1. Cancel booking POST https://api.duffel.com/stays/bookings/{{stay_booking_id}}/actions/cancel

  2. Search for accommodation by ids POST https://api.duffel.com/stays/search

  3. Fetch rates for a search result POST https://api.duffel.com/stays/search_results/{{stay_search_result}}/actions/fetch_all_rates

  4. Create a booking based on a Quote POST https://api.duffel.com/stays/bookings

  5. Get accommodation GET https://api.duffel.com/stays/accommodation/{{duffel_test_hotel}}

  6. Search for accommodation suggestions POST https://api.duffel.com/stays/accommodation/suggestions

  7. List loyalty programmes GET https://api.duffel.com/stays/loyalty_programmes

  8. Get a single booking GET https://api.duffel.com/stays/bookings/{{stay_booking_id}}

  9. List bookings GET https://api.duffel.com/stays/bookings

  10. Create a quote for a specific rate POST https://api.duffel.com/stays/quotes