Get Started
Search Use Cases
Booking Use Cases
API Documentation
Changelog
Hotel Search
Returns hotel search results
Basic authentication where:
- user-id is a partner account ID
- user-password is an API key token associated with the partner account
Parameters related to stay duration and guest count
A date in 'YYYY-MM-DD' format
A date in 'YYYY-MM-DD' format
Number of adults
Parameters related to filtering by location or hotel information
Location filtering parameters
Location filter type. Either 'iata_code' or 'coordinates'
Detail paramters related to location filter type
City or airport iata code for location based search. Note - only used when location type is set to iata_code.
Latitude value used for gps point of location based search. Note - only used when location type is set to coordinates.
Longitude value used for gps point of location based search. Note - only used when location type is set to coordinates.
Search radius parameters
Numberical value used for location radius
Unit type for distance calculation. Note either mi for miles or km for kilometers.
Search by a specific hotel chain and property code. A name can be included for additional filtering.
Hotel name filter. Can be a partial string. Minimum three characters for filtering to work.
Hotel chain code
Hotel property code
Token used to retrieve paginated search results. It's a UUID, so it's unique to each query.
Current page number
curl --request POST \
--url https://sandbox.travel.selfbook.com/rest/v1/hotel/search \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"stay_info": {
"check_in_date": "2024-11-20",
"check_out_date": "2024-11-21",
"guests": {
"adults": 1
}
},
"filter": {
"location": {
"type": "iata_code",
"details": {
"iata_code": "ORD"
},
"radius": {
"value": 5,
"type": "mi"
}
}
}
}'
Authorizations
Basic authentication where:
- user-id is a partner account ID
- user-password is an API key token associated with the partner account
Body
Parameters related to stay duration and guest count
Parameters related to filtering by location or hotel information
Response
curl --request POST \
--url https://sandbox.travel.selfbook.com/rest/v1/hotel/search \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"stay_info": {
"check_in_date": "2024-11-20",
"check_out_date": "2024-11-21",
"guests": {
"adults": 1
}
},
"filter": {
"location": {
"type": "iata_code",
"details": {
"iata_code": "ORD"
},
"radius": {
"value": 5,
"type": "mi"
}
}
}
}'