- DATE:
- AUTHOR:
- The Duffel team
API
Duffel Links
Stays
You can now book with children via the Stays API.
DATE:
AUTHOR:
The Duffel team
Stays API
In order to use this new feature, customers must move from the now deprecated adults field in location and accommodation search, and instead use our new guests field.
Here is an example search in London for 2 adults and 2 children via the Duffel JS SDK (available from v2.10.0):
import { Duffel } from '@duffel/api'
const duffel = new Duffel({
token: YOUR_ACCESS_TOKEN
})
duffel.stays.search({
"rooms": 1,
"location": {
"radius": 5,
"geographic_coordinates": {
"longitude": -0.1416,
"latitude": 51.5071
}
},
"guests": [
{"type": "adult"},
{"type": "adult"},
{"type": "child", "age": 7},
{"type": "child", "age": 12}
],
"check_out_date": "2023-09-20",
"check_in_date": "2023-09-21"
})
Links
Booking with children is now live for all customer in Duffel Links. No action is required.