Search destinations
const url = 'https://api.wink.travel/api/public/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/search?term=Bangkok';const options = { method: 'GET', headers: {'Wink-Version': '2.0', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.wink.travel/api/public/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/search?term=Bangkok' \ --header 'Authorization: Bearer <token>' \ --header 'Wink-Version: 2.0'Returns matching hotels, cities, countries, and attractions for the given search term, filtered by the managing entity. Matches names beginning with the term, case-insensitively. The term must be at least 3 characters, and at most 50 suggestions are returned, ordered by name.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Managing entity identifier (e.g., account or distribution channel ID)
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Query Parameters
Section titled “Query Parameters”Search term (e.g., city, hotel name, activity name). Matches names starting with the term; minimum 3 characters.
Example
BangkokHeader Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”Up to 50 matching lookup entries, name-ascending (may be empty if no matches)
Lightweight representation of a lookup entry used for search auto-complete and inventory discovery
object
Unique identifier for this record.
Type of lookup (CITY, HOTEL, ACTIVITY, SPA, RESTAURANT, ATTRACTION, ISLAND, COUNTRY, PLACE, MEETING_ROOM)
Unique identifier for the lookup type resource (e.g., hotel ID, city geoname ID)
Human-readable name of the lookup entry
URL-friendly slug that uniquely identifies this lookup within its type and location
Name of the owner (supplier) that created this lookup entry
Name of the closest city where this lookup entry is located
Country name where this lookup entry is located
State or province where this lookup entry is located
County or district where this lookup entry is located
ISO 3166-1 alpha-2 country code
Language code for the lookup name (ISO 639-1 format)
Geo-location
object
Datetime this record was first created
Datetime this record was last updated
Optimistic-locking version. Echo this value back as an If-Match request header on a conditional update; the server responds 409 if the record changed in the meantime. Null when this projection has no backing versioned document, in which case no conditional update is possible.
Example
[ { "id": "b7e4c1a2-3f5d-4e8a-9c21-6f0b5d8e3a47", "type": "HOTEL", "typeIdentifier": "a1f3c9d2-7e4b-4a0c-8d5e-2b9f1a6c3e78", "name": "The Siam Residences", "urlName": "the-siam-residences-bangkok-thailand", "ownerName": "The Siam Residences", "cityName": "Bangkok", "countryName": "Thailand", "subCountryName": "Bangkok", "subSubCountryName": "Khlong San District", "countryCode": "TH", "languageCode": "en", "location": { "type": "Point", "coordinates": [ 100.5581533, 13.7370197 ] } }]Bad Request — missing or invalid request parameter or body
object
object
Example
Unauthorized — authentication is required or the session has expired
object
object
Example
Forbidden — authenticated but lacking the required permission or scope
object
object
Example
Not Found — the requested resource does not exist
object
object
Example
Method Not Allowed — the HTTP verb is not supported on this endpoint
object
object
Example
Conflict — the resource was modified by someone else since you read it; re-read it and retry with the new version
object
object
Example
Unsupported Media Type — use application/json
object
object
Example
Internal Server Error — an unexpected failure occurred on the server
object
object
Example
Service Unavailable — a downstream dependency is unreachable
