Simply retrieving inventory, availability, and pricing information separately is often insufficient. Users typically need a unified search results page that combines these elements, allowing them to search, sort, and filter to find their perfect place to stay.
This suite of APIs is designed to support these use cases, providing the necessary tools to create a cohesive and user-friendly search experience.
enum AccommodationType # See information from Unit
enum CancellationPolicyType {
Flexible,
NonFlexible
}
input SearchQueryInput = {
filters: {
geo: {
country: [ISO3166_1],
},
amenitities: [string],
unitType: {
accommodationType: [AccommodationType],
bedrooms: {
min: number,
max: number
},
bathrooms: {
min: number,
max: number,
},
accommodates: {
min: number,
max: number,
}
}
ratePlans: {
policies: {
cancellation: [CancellationPolicyType]
}
# As days
lengthOfStay: {
min: number,
max: number,
}
}
},
sort: {
attribute: 'price' | 'name',
order: 'asc' | 'desc'
}
}
query {
ecommerce {
# This query supports our pagination system
searchByUnitType($q: SearchQueryInput) {
edges {
node {
unitType {
# See
}
ratePlans {
# See rate plan information
}
}
}
}
}
}