Skip to content

Get

POST
/wink.partner.v1.Lookup/Get
curl --request POST \
--url https://example.com/wink.partner.v1.Lookup/Get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "urlName": "bangkok-thailand", "type": "CITY" }'

Look up by URL slug

Resolve one destination from its URL slug and type — for example bangkok-thailand plus DESTINATION_TYPE_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 destination 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”.

Media typeapplication/json

Your Wink account identifier. Every call is scoped to one account, and your token must hold INVENTORY:READ on it.

object
urlName

URL slug of the destination, e.g. bangkok-thailand. Required.

string
type

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.

string
Allowed values: DESTINATION_TYPE_UNSPECIFIED DESTINATION_TYPE_CITY DESTINATION_TYPE_ISLAND DESTINATION_TYPE_PROPERTY DESTINATION_TYPE_SPA DESTINATION_TYPE_MEETING_ROOM DESTINATION_TYPE_RESTAURANT DESTINATION_TYPE_ATTRACTION DESTINATION_TYPE_ACTIVITY DESTINATION_TYPE_PLACE DESTINATION_TYPE_COUNTRY
Example
{
"urlName": "bangkok-thailand",
"type": "CITY"
}

The RPC completed with gRPC status OK.

Media typeapplication/json
object
destination

The resolved destination.

object
id

Wink’s identifier for this destination entry.

string
type

What kind of place this is. Determines what type_identifier refers to.

string
Allowed values: DESTINATION_TYPE_UNSPECIFIED DESTINATION_TYPE_CITY DESTINATION_TYPE_ISLAND DESTINATION_TYPE_PROPERTY DESTINATION_TYPE_SPA DESTINATION_TYPE_MEETING_ROOM DESTINATION_TYPE_RESTAURANT DESTINATION_TYPE_ATTRACTION DESTINATION_TYPE_ACTIVITY DESTINATION_TYPE_PLACE DESTINATION_TYPE_COUNTRY
typeIdentifier

Identifier of the underlying resource — a property ID for DESTINATION_TYPE_PROPERTY, a geoname ID for DESTINATION_TYPE_CITY and DESTINATION_TYPE_COUNTRY. This is the id you pass to the other Wink endpoints that take a property or place.

string
name

Display name, in the language given by language_code.

string
urlName

URL slug. Pass this back to the lookup-by-slug call to resolve this destination later.

string
ownerName

Display name of the supplier that created this entry, where one applies.

string
cityName

Nearest city.

string
countryName
string
subCountryName

State or province.

string
subSubCountryName

County or district.

string
countryCode

ISO 3166-1 alpha-2 country code.

string
languageCode

ISO 639-1 code for the language name is written in.

string
longitude

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.

number format: double
latitude
number format: double
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
}
}