DATE:
AUTHOR:
The Duffel team
API API Documentation Client Libraries & SDKs Stays

You can now filter on accommodation types

DATE:
AUTHOR: The Duffel team

You can now choose which types of accommodation you get back when you list, search for, or get suggestions for accommodation.

Use accommodation_type_includes to return only the types you list, or accommodation_type_excludes to leave them out. They work on three endpoints:

  • GET /stays/accommodation: as the query parameters accommodation_type_includes[] and accommodation_type_excludes[].

  • POST /stays/search and POST /stays/accommodation/suggestions: inside the location object of the request body.

You can send either one or the other, not both.

Each accommodation now also returns a type field. You can find the full list of supported types in our API reference. If the accommodation is unclassified, its type is null. Unclassified types are not returned when you filter.

Powered by LaunchNotes