Look up by URL slug
const url = 'https://dev-api.wink.travel:8446/wink.partner.v1.Lookup/Get';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"managingEntityIdentifier":"71f0ec54-c24b-463a-a72e-b060c6c7a6fe","urlName":"bangkok-thailand","type":"CITY"}'};
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/Get \ --header 'Content-Type: application/json' \ --data '{ "managingEntityIdentifier": "71f0ec54-c24b-463a-a72e-b060c6c7a6fe", "urlName": "bangkok-thailand", "type": "CITY" }'Look up by URL slug
Resolve one destination from its URL slug and type — for example bangkok-thailand plus
CITY. Use it after Search, or whenever you already hold a Wink destination slug in your own
routing.
Both fields are required, because a slug is only unique within a type.
Returns NOT_FOUND when nothing matches. For a hotel that exists but sits outside your sales channel it returns PERMISSION_DENIED instead, so you can tell “not yours to sell” apart from “no such destination”.
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.
URL slug of the destination, e.g. bangkok-thailand. Required.
Type of the destination you are resolving. Required — a slug is only unique within a type, so leaving this unset is rejected rather than guessed.
Example
{ "managingEntityIdentifier": "71f0ec54-c24b-463a-a72e-b060c6c7a6fe", "urlName": "bangkok-thailand", "type": "CITY"}Responses
Section titled “Responses”The RPC completed with gRPC status OK.
object
The resolved destination.
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
{ "destination": { "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 }}