- DATE:
- AUTHOR:
- The Duffel team
You can now filter on accommodation types
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 parametersaccommodation_type_includes[]andaccommodation_type_excludes[].POST /stays/searchandPOST /stays/accommodation/suggestions: inside thelocationobject 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.