Search by term
const url = 'https://dev-api.wink.travel:8446/wink.partner.v1.Lookup/Search';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"managingEntityIdentifier":"71f0ec54-c24b-463a-a72e-b060c6c7a6fe","term":"bangkok"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dev-api.wink.travel:8446/wink.partner.v1.Lookup/Search \ --header 'Content-Type: application/json' \ --data '{ "managingEntityIdentifier": "71f0ec54-c24b-463a-a72e-b060c6c7a6fe", "term": "bangkok" }'Search by term
Typeahead search across destinations. Send the partial text your user has typed and render the results as suggestions.
Terms shorter than 3 characters return an empty list rather than an error, so it is safe to call on every keystroke. At most 50 results are returned, most relevant first.
Suggestions are not filtered by your sales channel — a hotel you cannot sell may still appear here. Get is where that is enforced.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Your Wink account identifier. Every call is scoped to one account, and your token must hold INVENTORY:READ on it.
What the user has typed so far. Fewer than 3 characters (after trimming) returns an empty list rather than an error.
Example
{ "managingEntityIdentifier": "71f0ec54-c24b-463a-a72e-b060c6c7a6fe", "term": "bangkok"}Responses
Section titled “Responses”The RPC completed with gRPC status OK.
object
Matching destinations, most relevant first. At most 50.
A place you can search for and sell through Wink.
object
Wink’s identifier for this destination entry.
What kind of place this is. Determines what type_identifier refers to.
Identifier of the underlying resource — a hotel ID for HOTEL, a geoname ID for CITY and COUNTRY. This is the id you pass to the other Wink endpoints that take a property or place.
Display name, in the language given by language_code.
URL slug. Pass this back to the lookup-by-slug call to resolve this destination later.
Display name of the supplier that created this entry, where one applies.
Nearest city.
State or province.
County or district.
ISO 3166-1 alpha-2 country code.
ISO 639-1 code for the language name is written in.
Longitude and latitude in decimal degrees. Both are omitted together when the location is unknown — which is why they are optional rather than defaulting to 0/0, a real place in the Gulf of Guinea.
Example
{ "destinations": [ { "id": "efb6edfd-7969-434e-8453-be3495a9ffb1", "type": "CITY", "typeIdentifier": "1609350", "name": "Bangkok", "urlName": "bangkok-thailand", "cityName": "Bangkok", "countryName": "Thailand", "subCountryName": "Bangkok", "countryCode": "TH", "languageCode": "en", "longitude": 100.5493, "latitude": 13.7412 }, { "id": "025a9f08-a528-4a24-a2ef-c0c3cf74e0d4", "type": "HOTEL", "typeIdentifier": "71f0ec54-c24b-463a-a72e-b060c6c7a6fe", "name": "Amayen Sanctuary", "urlName": "amayen-sanctuary-doi-saket-thailand", "cityName": "Doi Saket", "countryName": "Thailand", "subCountryName": "Chiang Mai", "countryCode": "TH", "languageCode": "en", "longitude": 99.24162894487381, "latitude": 18.907146707330355 } ]}