POST /v1/hotels/searches
Creates a Book-on-Wego hotel search (city, single hotel, or geo point) and returns its opaque searchId plus the occupancy priced upstream (resolved child ages, incl. the age-8 fallback when none were supplied). Poll /results for ranked hotels.
Operation ID: createHotelSearch
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
cityCode |
string | no | |
hotelId |
integer | no | |
lat |
number | no | |
lng |
number | no | |
radius |
number | no | |
checkIn |
string | yes | |
checkOut |
string | yes | |
adults |
integer | no | |
children |
integer | no | |
rooms |
integer | no | |
childrenAges |
integer[] | no | Per-child ages (integers 0-17). When provided, the count must equal children. When omitted, each child is priced at age 8 (the documented fallback). |
currency |
string | no | |
locale |
string | no | |
siteCode |
string | no | Wego market (point of sale) as a 2-letter code, e.g. AE. Optional: if omitted the API defaults to US. A client that knows the user’s market (the wego CLI derives it from the id_token) passes it as an explicit siteCode. |
Responses
| Status | Description |
|---|---|
201 |
Search created. |
400 |
Invalid request parameters. |
401 |
Missing or invalid bearer token. |
429 |
Rate limit exceeded; retry after the Retry-After seconds. |
502 |
The upstream hotels service returned an invalid response. |
503 |
The hotels service is unavailable; retry after the Retry-After seconds. |
Example
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"checkIn":"string","checkOut":"string"}' \
"https://api.wego.com/v1/hotels/searches"