Skip to main content

/location-links

Retrieve links to the location search pages of various providers.

Endpoint URL

https://partners.api.vio.com/v1/location-links

HTTP Method

POST

Headers

NameRequiredDescription
X-Partner-KeyYesPartner's profile key
Content-TypeYesapplication/json
Accept-EncodingNogzip, deflate, br

Request body

API Parameters

NameRequiredTypeDescriptionExample QueryDefault value
queryYesstringFree-text queryAmsterdam city
checkInNostringCheck in date (YYYY-MM-DD)2023-05-10
checkOutNostringCheck out date (YYYY-MM-DD)2023-05-11
roomsYesstringSee Rooms configuration2:4,62
languageYesstringSee supported languagesesen
currencyYesstringSee supported currenciesUSDEUR
anonymousIdNostringAnonymous user identifiere0775301-a95a-4b56-a727-9cec40a013af
userDeviceYesstringThe type of the user's device: desktop, mobile, tablet. If not specified, the API determines it based on the caller's User-Agent header."desktop""desktop"
userCountryYesstringThe 2-char ISO 3166 country code of a user. If not specified, the API determines it based on the caller's IP address."US"
vioOnlyNobooleanReturn only Vio.com location links
labelNostringArbitrary string for tracking and reporting.
placeNojsonObjectObject for querying specific place details, including place name and country for refining searches in case of duplicate place names in different countries.{ "name": "Paris", "country": "France" }

PlaceQuery Definition

PlaceQuery:
type: object
properties:
country:
type: string
description: |
Country of the place. Use this parameter to refine the search if there are places (e.g. cities) with the same names in different countries.
If the "name" parameter value is the country itself, then this parameter can be ignored.
name:
type: string
description: The name of the place to query.
required:
- name

Dynamic Click Tracking

Click tracking is available using Dynamic Click Tracking

Example


curl --request POST 'https://partners.api.vio.com/v1/location-links' \
--header 'X-Partner-Key: partner-profile-key' \
--header 'Content-Type: application/json' \
--data-raw '{
"checkIn": "2023-03-19",
"checkOut": "2023-03-20",
"rooms": "2",
"language": "en",
"currency": "EUR",
"userCountry": "ES",
"userDevice": "mobile",
"query": "Madrid, Spain"
}'


curl --request POST 'https://partners.api.vio.com/v1/location-links' \
--header 'X-Partner-Key: partner-profile-key' \
--header 'Content-Type: application/json' \
--data-raw '{
"checkIn": "2023-03-19",
"checkOut": "2023-03-20",
"rooms": "2",
"language": "en",
"currency": "EUR",
"userCountry": "GB",
"userDevice": "desktop",
"place": {
"name": "Madrid",
"country": "Spain"
}
}'

Response

The response payload has the following fields:

FieldTypeDescription
linksProviderLinks[]A List of providers links.
FieldTypeDescription
namestringProvider's name.
logostringProvider's logo.
urlstringBook url.

Example:

{
"name": "Vio.com",
"logo": "https://i.fih.io/provider/svg/fht.svg",
"url": "https://r.vio.com/..."
}

Live demos

This is an example of how the /v1/location-links endpoint can be used to create an inline banner with redirect links to different providers.