### Provider Object Example Source: https://developers.vio.com/docs/Partners-API/search An example of the Provider object, detailing information about the offer provider. It includes the provider's name and logo URL. ```json { "name": "Vio.com", "logoUrl": "https://i.fih.io/provider/svg/fht.svg" } ``` -------------------------------- ### Single Hotel Offers Search - React Example Source: https://developers.vio.com/docs/Partners-API/search A React example demonstrating how to use the `/search` endpoint to find offers for a specific hotel. It includes functionality to display deal details like meals, cancellation policies, and payment options. ```javascript import { useState } from "react"; import JSONPretty from "react-json-pretty"; import { Tab, Tabs, TabList, TabPanel } from "react-tabs"; import "./styles.css"; import "react-json-pretty/themes/monikai.css"; import "react-tabs/style/react-tabs.css"; import { Header } from "./Header"; import { SearchForm } from "./SearchForm"; import { HotelOffers } from "./HotelOffers"; export default function App() { const [loading, setloading] = useState(false); const [fetchError, setFetchError] = useState(null); const [searchParams, setSearchParams] = useState(null); const [data, setData] = useState(null); const searchOffers = async ({ query, checkIn, checkOut }) => { if (loading) { return; } setloading(true); }; return ( <>
Search Results Raw Data
{data && } {loading &&

Loading...

} {fetchError &&

Error: {fetchError}

}
); } ``` -------------------------------- ### Hotel Search API Source: https://developers.vio.com/docs/getting-started This endpoint allows you to search for hotels based on check-in/check-out dates, hotel names, location, number of rooms, currency, and language. ```APIDOC ## POST /v1/search ### Description Searches for hotels based on specified criteria. ### Method POST ### Endpoint https://partners.api.vio.com/v1/search ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **checkIn** (string) - Required - The check-in date in YYYY-MM-DD format. - **checkOut** (string) - Required - The check-out date in YYYY-MM-DD format. - **query** (object) - Required - Search query object. - **hotelNames** (object) - Required - Hotel name and location details. - **names** (array of strings) - Required - A list of hotel names to search for. - **city** (string) - Required - The city for the hotel search. - **country** (string) - Required - The country for the hotel search. - **rooms** (string) - Required - The number of rooms to book. - **language** (string) - Required - The preferred language for the results (e.g., 'en'). - **currency** (string) - Required - The preferred currency for the results (e.g., 'EUR'). ### Request Example ```json { "checkIn": "2024-06-19", "checkOut": "2024-06-20", "query": { "hotelNames": { "names": [ "New York - New York Hotel and Casino", "Palms Place Hotel and Spa", "The Palazzo at The Venetian" ], "city": "Las Vegas", "country": "United States" } }, "rooms": "2", "language": "en", "currency": "EUR" } ``` ### Response #### Success Response (200) - **hotels** (array) - A list of hotel search results. - **id** (string) - Unique identifier for the hotel. - **name** (string) - Name of the hotel. - **availability** (object) - Hotel availability details. - **totalRooms** (integer) - Total number of available rooms. - **roomsFrom** (number) - Starting price for available rooms. - **address** (object) - Hotel address details. - **street** (string) - Street address. - **city** (string) - City. - **country** (string) - Country. #### Response Example ```json { "hotels": [ { "id": "hotel123", "name": "New York - New York Hotel and Casino", "availability": { "totalRooms": 10, "roomsFrom": 150.50 }, "address": { "street": "3790 S Las Vegas Blvd", "city": "Las Vegas", "country": "United States" } } ] } ``` ``` -------------------------------- ### Hotel Object Example Source: https://developers.vio.com/docs/Partners-API/search An example of the Hotel object, showing how to request a hotel by its name and display offers. It includes fields like requestedName and offers. ```json { "requestedName": "Leonardo Hotel Amsterdam Rembrandtpark", "offers": [...] } ``` -------------------------------- ### Get List of Themes (Bash) Source: https://developers.vio.com/docs/Partners-API/list This example shows how to use curl to request a list of themes from the `/list` endpoint. Similar to fetching property types, it requires the 'X-Partner-Key' header and sets the 'entity' parameter to 'theme'. ```Bash curl --location --request GET 'https://partners.api.vio.com/v1/list?entity=theme&language=en' \ --header 'X-Partner-Key: ' ``` -------------------------------- ### Get Nearby Places - Python Example Source: https://developers.vio.com/docs/Partners-API/nearby-places Example of how to call the /nearby-places API using Python's requests library. It illustrates setting the URL, request body, and headers, and processing the response. ```python import requests url = "https://partners.api.vio.com/v1/location-links" key = "partner-profile-key" request_body = { "placeName": "Amsterdam", "country": "Netherlands", "radius": 20, "placeCategories": [ "city" ], "hits": 10, "language": "en", "currency": "USD", "userCountry": "US", "userDevice": "desktop" } headers = { "Content-Type": "application/json", "X-Partner-Key": key, } response = requests.post(url, json=request_body, headers=headers) if response.status_code != 200: raise Exception("Request failed with status code {}".format(response.status_code)) response_data = response.json() print(response_data) ``` -------------------------------- ### Get Nearby Places - Bash Example Source: https://developers.vio.com/docs/Partners-API/nearby-places Example of how to call the /nearby-places API using curl in Bash. It demonstrates setting the endpoint URL, headers, and the JSON request body with various parameters. ```bash curl --request POST 'https://partners.api.vio.com/v1/nearby-places' \ --header 'X-Partner-Key: partner-profile-key' \ --header 'Content-Type: application/json' \ --data-raw '{ "placeName": "Amsterdam", "country": "Netherlands", "radius": 20, "placeCategories": [ "city" ], "hits": 10, "language": "en", "currency": "USD", "userCountry": "US", "userDevice": "desktop" }' ``` -------------------------------- ### HotelDetails Object Example Source: https://developers.vio.com/docs/Partners-API/search An example of the HotelDetails object, providing comprehensive information about a hotel. It includes fields like name, location, address, starRating, images, and distanceFromCityCentre. ```json { "name": "Leonardo Hotel Amsterdam Rembrandtpark", "location": { "lat": 52.368132, "lon": 4.844 }, "address": "Staalmeesterslaan 410", "starRating": 4, "images": [ "https://....jpg" ], "distanceFromCityCentre": 3435 } ``` -------------------------------- ### Make a Vio.com API Search Request (curl) Source: https://developers.vio.com/docs/getting-started This snippet demonstrates how to make a POST request to the Vio.com search API. It requires a profile key for authentication and specifies search parameters like check-in/out dates, hotel names, city, country, number of rooms, language, and currency. ```curl curl --request POST 'https://partners.api.vio.com/v1/search' \ --header 'X-Partner-Key: ' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "checkIn": "2024-06-19", \ "checkOut": "2024-06-20", \ "query": { \ "hotelNames": { \ "names": [ \ "New York - New York Hotel and Casino", \ "Palms Place Hotel and Spa", \ "The Palazzo at The Venetian" \ ], \ "city": "Las Vegas", \ "country": "United States" \ } \ }, \ "rooms": "2", \ "language": "en", \ "currency": "EUR" \ }' ``` -------------------------------- ### Get Nearby Places - Javascript Example Source: https://developers.vio.com/docs/Partners-API/nearby-places Example of how to call the /nearby-places API using Javascript's fetch API. It shows constructing the request URL, headers, and JSON body, and handling the response. ```javascript const url = "https://partners.api.vio.com/v1/location-links"; const key = "partner-profile-key"; const requestBody = { placeName: "Amsterdam", country: "Netherlands", radius: 20, placeCategories: ["city"], hits: 10, currency: "USD", language: "en", userCountry: "US", userDevice: "desktop" }; const headers = { "Content-Type": "application/json", "X-Partner-Key": key, }; fetch(url, { method: "POST", headers: headers, body: JSON.stringify(requestBody), }) .then((response) => { if (!response.ok) { throw new Error("Network response was not ok"); } return response.json(); }) .then((data) => console.log(data)) .catch((error) => console.error(error)); ``` -------------------------------- ### Get List of Property Types (Bash) Source: https://developers.vio.com/docs/Partners-API/list This example demonstrates how to use curl to make a GET request to the `/list` endpoint to retrieve a list of property types. It requires the partner's profile key in the headers and specifies 'propertyType' as the entity. ```Bash curl --location --request GET 'https://partners.api.vio.com/v1/list?entity=propertyType&language=en' \ --header 'X-Partner-Key: ' ``` -------------------------------- ### GET /suggest Source: https://developers.vio.com/docs/Partners-API/openAPI-schema Provides search suggestions based on a free-text query. This endpoint is useful for implementing type-ahead search functionality. ```APIDOC ## GET /suggest ### Description Provides search suggestions based on a free-text query. ### Method GET ### Endpoint /suggest ### Parameters #### Query Parameters - **query** (string) - Required - Free-text query. ``` -------------------------------- ### Search Hotels by Name (Bash, Javascript, Python) Source: https://developers.vio.com/docs/Partners-API/search This snippet demonstrates how to search for hotels by their names using the Vio.com API. It includes examples in Bash using curl, Javascript using fetch, and Python using the requests library. Ensure you replace '' or 'partner-profile-key' with your actual partner key. ```bash curl --request POST 'https://partners.api.vio.com/v1/search' \ --header 'X-Partner-Key: ' \ --header 'Content-Type: application/json' \ --data-raw '{ "checkIn": "2023-10-19", "checkOut": "2023-10-20", "query": { "hotelNames": { "names": [ "New York - New York Hotel and Casino", "Palms Place Hotel and Spa", "The Palazzo at The Venetian" ], "city": "Las Vegas", "country": "United States" } }, "rooms": "2", "language": "en", "currency": "EUR", "userCountry": "US", "userDevice": "desktop" }' ``` ```javascript fetch("https://partners.api.vio.com/v1/search", { method: "POST", headers: { "X-Partner-Key": "partner-profile-key", "Content-Type": "application/json" }, body: JSON.stringify({ checkIn: "2023-10-19", checkOut: "2023-10-20", query: { hotelNames: { names: [ "New York - New York Hotel and Casino", "Palms Place Hotel and Spa", "The Palazzo at The Venetian" ], city: "Las Vegas", country: "United States" } }, rooms: "2", language: "en", currency: "EUR", userCountry: "US", userDevice: "desktop" }) }) .then((response) => response.json()) .then((data) => console.log(data)) .catch((error) => console.error(error)); ``` ```python import requests import json url = "https://partners.api.vio.com/v1/search" headers = {"X-Partner-Key": "partner-profile-key", "Content-Type": "application/json"} payload = { "checkIn": "2023-10-19", "checkOut": "2023-10-20", "query": { "hotelNames": { "names": [ "New York - New York Hotel and Casino", "Palms Place Hotel and Spa", "The Palazzo at The Venetian" ], "city": "Las Vegas", "country": "United States" } }, "rooms": "2", "language": "en", "currency": "EUR", "userCountry": "US", "userDevice": "desktop" } response = requests.post(url, headers=headers, data=json.dumps(payload)) print(response.json()) ``` -------------------------------- ### Suggest Places using cURL Source: https://developers.vio.com/docs/Partners-API/suggest This snippet demonstrates how to use cURL to get suggested places for a given query. It requires the 'query' parameter and the 'X-Partner-Key' header. ```bash curl --location --request GET 'https://partners.api.vio.com/v1/suggest?query=Amsterdam' \ --header 'X-Partner-Key: ' ``` -------------------------------- ### Geolocation Object Example Source: https://developers.vio.com/docs/Partners-API/search An example of the Geolocation object, used to represent the geographical coordinates of a location. It contains latitude and longitude values. ```json { "lat": 52.368132, "lon": 4.844 } ``` -------------------------------- ### Basic Hotel Card Widget embed example Source: https://developers.vio.com/docs/Widgets/hotel-card-widget A simple example of embedding the Hotel Card Widget with basic parameters for a specific hotel in Barcelona, Spain. This showcases the minimal configuration required for a functional embed. ```html ``` -------------------------------- ### GET /websites/developers_vio/search/suggest Source: https://developers.vio.com/docs/Partners-API/openAPI-schema Retrieves suggested search results for a given query, with an optional language code. ```APIDOC ## GET /websites/developers_vio/search/suggest ### Description Get suggested search results for a given query. ### Method GET ### Endpoint /websites/developers_vio/search/suggest ### Parameters #### Query Parameters - **query** (string) - Required - The search query string. - **language** (string) - Optional - Language code to translate suggestions. Enum: [ar, bg, ca, cs, cz, da, de, en, en-GB, es, et, fi, fr, he, hr, hu, id, is, it, iw, ja, ko, lt, lv, ms, nl, no, nb, nn, pl, pt, pt-BR, ro, ru, sk, sl, sr, sv, th, tl, tr, uk, vi, zh, zh-CN, zh-TW, zh-HK, es-MX, el, bn, fil, fr-CA, hi, mr]. Default: en ### Request Example ```json { "example": "Not applicable for GET request" } ``` ### Response #### Success Response (200) - **suggestions** (array) - A list of suggested search terms. #### Response Example ```json { "example": { "suggestions": [ "suggestion1", "suggestion2" ] } } ``` #### Error Responses - **400**: Bad Request - **401**: Unauthorized - **429**: Too Many Requests - **500**: Internal Server Error ``` -------------------------------- ### GET /v1/suggest Source: https://developers.vio.com/docs/Partners-API/suggest Retrieves suggested search results for a given query. This endpoint is useful for providing users with relevant search options as they type. ```APIDOC ## GET /v1/suggest ### Description Get suggested search results for a given query. ### Method GET ### Endpoint `https://partners.api.vio.com/v1/suggest` ### Headers - **X-Partner-Key** (string) - Required - Partner's profile key - **Accept-Encoding** (string) - Optional - `gzip, deflate, br` ### Query Parameters - **query** (string) - Required - Free-text query. Example: `"Amsterdam"` - **language** (string) - Optional - Language code to translate suggestions. See supported languages. Example: `"en"`, Default: `"en"` ### Request Example ```bash curl --location --request GET 'https://partners.api.vio.com/v1/suggest?query=Amsterdam' \ --header 'X-Partner-Key: ' ``` ### Response #### Success Response (200) - **suggestions** (Suggestion[]) - The list of suggestions. ### `Suggestion` - **objectId** (string) - Object ID. - **objectType** (string) - Object type: `place`, `hotel`. - **placeDisplayName** (string) - Address display name. - **placeTypeName** (string) - Suggested place type: `property`, `country`, `city`, `airport`, `station`, `area`. - **value** (string) - Full name of the suggestion. - **highlightValue** (string) - Markup text with occurrences highlighted. #### Response Example ```json { "suggestions": [ { "objectId": "12345", "objectType": "place", "placeDisplayName": "Amsterdam, Netherlands", "placeTypeName": "city", "value": "Amsterdam", "highlightValue": "Amsterdam" } ] } ``` ``` -------------------------------- ### Vio.com API Response Payload Example (JSON) Source: https://developers.vio.com/docs/Partners-API/location-links This JSON object demonstrates the structure of a typical response payload from the Vio.com API. It includes a list of provider links, each with a name, logo, and booking URL. ```json { "name": "Vio.com", "logo": "https://i.fih.io/provider/svg/fht.svg", "url": "https://r.vio.com/..." } ``` -------------------------------- ### Initiate Search Poll Request (cURL) Source: https://developers.vio.com/docs/Partners-API/search-long-polling This cURL command demonstrates how to send the initial POST request to the /search/poll endpoint to start a long-polling session. It includes necessary headers like 'X-Partner-Key' and 'Content-Type', along with the request body specifying search criteria such as dates, hotel names, city, country, rooms, language, currency, user country, and user device. ```cURL curl --request POST 'https://partners.api.vio.com/v1/search/poll' \ --header 'X-Partner-Key: ' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "checkIn": "2023-10-19", \ "checkOut": "2023-10-20", \ "query": { \ "hotelNames": { \ "names": [ \ "New York - New York Hotel and Casino", \ "Palms Place Hotel and Spa", \ "The Palazzo at The Venetian" \ ], \ "city": "Las Vegas", \ "country": "United States" \ } \ }, \ "rooms": "2", \ "language": "en", \ "currency": "EUR", \ "userCountry": "DE", \ "userDevice": "desktop" \ }' ``` -------------------------------- ### Embed VIO Hotel Widget by Hotel Name and Currency Source: https://developers.vio.com/docs/Widgets/hotel-card-widget This example demonstrates embedding the VIO hotel card widget by specifying hotel name, country, city, and desired currency. Replace '' with your partner key. The widget is set to full width and 565px height. ```html ``` -------------------------------- ### Search Hotels by City with Price Filter and Sorting (Bash) Source: https://developers.vio.com/docs/Partners-API/search This Bash script demonstrates how to search for hotels in a city with specific price filters and sorting options. It allows you to set a minimum and maximum price, sort results by price, and set a request timeout. Remember to replace '' with your actual partner key. ```bash curl --request POST 'https://partners.api.vio.com/v1/search' \ --header 'X-Partner-Key: ' \ --header 'Content-Type: application/json' \ --data-raw '{ "checkIn": "2023-10-19", "checkOut": "2023-10-20", "query": { "place": { "name": "London" } }, "hotelAttributes": ["details"], "rooms": "2", "language": "en", "currency": "EUR", "userCountry": "GB", "userDevice": "mobile", "sortField": "price", "sortOrder": "ascending", "filters": { "price": { "min": 200, "max": 400 } }, "timeout": 6 }' ``` -------------------------------- ### Build Homepage Link Source: https://developers.vio.com/docs/Partners-API/build-links This snippet demonstrates how to build a link to the Vio.com homepage. It requires a partner key and specifies a label for tracking. The API will return a generated homepage link. ```Bash curl --request POST 'https://partners.api.vio.com/v1/build-links' \ --header 'X-Partner-Key: partner-profile-key' \ --header 'Content-Type: application/json' \ --data-raw '{ "homePageLinkParams": { "label": "test" } }' ``` -------------------------------- ### Build Search Page Links Source: https://developers.vio.com/docs/Partners-API/build-links This snippet shows how to build multiple links to Vio.com search results pages. It requires a partner key, a label, and a list of hotel or place URLs. The API returns a list of generated search page links corresponding to the provided URLs. ```Bash curl --request POST 'https://partners.api.vio.com/v1/build-links' \ --header 'X-Partner-Key: partner-profile-key' \ --header 'Content-Type: application/json' \ --data-raw '{ "searchPageLinkParams": { "label": "test", "urls": [ "https://www.vio.com/Hotel/Search?hotelId=1103101&checkIn=2023-10-08&checkOut=2023-10-09&rooms=2&userSearch=1&homeSearch=1", "https://www.vio.com/Hotel/Search?placeId=24399&checkIn=2023-08-24&checkOut=2023-08-25&rooms=2&userSearch=1&homeSearch=1" ] } }' ``` -------------------------------- ### Redirect Banner with Location-Based Links (React) Source: https://developers.vio.com/docs/Partners-API/location-links This React code example demonstrates how to implement a redirect banner using the '/v1/location-links' endpoint. It allows users to see and click on links to different providers based on their location. The example utilizes React components and dependencies like react-scripts and react-tabs. ```javascript import React from 'react'; import Header from './Header'; import SearchForm from './SearchForm'; import InlineAdsBanner from './InlineAdsBanner'; import './styles.css'; function App() { return (
); } export default App; ``` -------------------------------- ### Package Object Structure Source: https://developers.vio.com/docs/Partners-API/search Describes the structure for package details, specifying offered amenities and whether payment can be deferred. This helps in understanding the inclusions and payment terms of a hotel offer. ```json { "amenities": ["breakfast", "internetIncluded"], "canPayLater": false } ``` -------------------------------- ### Get Nearby Places Source: https://developers.vio.com/docs/Partners-API/nearby-places Retrieves a list of nearby places with detailed information for each place. ```APIDOC ## GET /websites/developers_vio/nearby ### Description This endpoint retrieves a list of nearby places, providing details such as place name, ID, category, country, distance in kilometers, number of hotels, and a redirection URL. ### Method GET ### Endpoint /websites/developers_vio/nearby ### Parameters #### Query Parameters - **latitude** (number) - Required - The latitude of the user's current location. - **longitude** (number) - Required - The longitude of the user's current location. - **radius** (number) - Optional - The radius in kilometers to search for nearby places. ### Request Example (No request body for GET request) ### Response #### Success Response (200) - **places** (array) - A list of `NearbyPlace` objects. - **placeName** (string) - Place name. - **placeId** (string) - Place ID. - **placeCategory** (string) - Place category. - **placeCountry** (string) - Place country. - **distanceKM** (number) - Distance to the place in kilometers. - **hotelsCnt** (integer) - Number of hotels in the place. - **url** (string) - The URL that redirects a user to the full search results for this place. #### Response Example ```json { "places": [ { "placeName": "The Hague", "placeId": "49458", "placeCategory": "city", "placeCountry": "The Netherlands", "distanceKM": 0, "url": "https://www.vio.com/Hotel/Search?curr=EUR&forceCurrencyChange=1&forceLanguageChange=1&lang=en&placeId=49458&rooms=2&utm_source=kiwi", "hotelsCnt": 593 }, { "placeName": "Rotterdam", "placeId": "56452", "placeCategory": "city", "placeCountry": "The Netherlands", "distanceKM": 0, "url": "https://www.vio.com/Hotel/Search?curr=EUR&forceCurrencyChange=1&forceLanguageChange=1&lang=en&placeId=56452&rooms=2&utm_source=kiwi", "hotelsCnt": 380 } ] } ``` ``` -------------------------------- ### Hotel Search and Details Source: https://developers.vio.com/docs/Partners-API/openAPI-schema Retrieve a list of hotels based on search criteria or get detailed information about a specific hotel. ```APIDOC ## GET /websites/developers_vio/hotels ### Description Retrieves a list of hotels matching the specified search criteria, or provides detailed information for a given hotel ID. ### Method GET ### Endpoint /websites/developers_vio/hotels ### Parameters #### Query Parameters - **destinationId** (string) - Optional - The destination ID for the search. - **destinationName** (string) - Optional - The name of the destination. - **offerId** (string) - Optional - Filter by a specific offer ID. - **hotelId** (string) - Optional - Filter by a specific hotel ID. - **checkinDate** (string) - Optional - The check-in date in YYYY-MM-DD format. - **checkoutDate** (string) - Optional - The check-out date in YYYY-MM-DD format. - **adults** (integer) - Optional - The number of adults. - **children** (integer) - Optional - The number of children. - **rooms** (integer) - Optional - The number of rooms. - **filters** (object) - Optional - An object containing various filters (see Filters schema below). ### Request Example ```json { "query": { "destinationName": "Paris", "checkinDate": "2024-08-01", "checkoutDate": "2024-08-05", "adults": 2, "filters": { "starRatings": [4, 5], "freeCancellation": true, "guestRating": 8 } } } ``` ### Response #### Success Response (200) - **data** (object) - Contains hotel search results or hotel details. - **hotels** (array) - List of hotels matching the search criteria. - **anchorRate** (object) - The anchor rate for the hotel. - **details** (object) - Detailed information about the hotel (see HotelDetails schema below). - **id** (string) - Hotel ID. - **offers** (array) - List of offers for the hotel. - **requestedName** (string) - Hotel name if queried by name. - **roomsConfig** (string) - Room configuration details. #### Response Example ```json { "data": { "hotels": [ { "id": "someHotelId1", "details": { "name": "Grand Hotel Paris", "location": { "latitude": 48.8566, "longitude": 2.3522 }, "address": "123 Main St, Paris", "starRating": 5, "reviewCount": 1500, "guestRating": { "overall": 9.2, "cleanliness": 9.5, "service": 9.0, "location": 9.3, "rooms": 9.1, "dining": 8.8, "facilities": 9.4, "pricing": 8.5 }, "images": [ "http://example.com/img1.jpg", "http://example.com/img2.jpg" ], "facilities": [1, 5, 10], "vioUrl": "http://vio.com/hotel/someHotelId1" }, "offers": [ { "id": "offer123", "rate": { "currencyCode": "EUR", "price": 250.00, "percentage": 10 }, "roomDetails": { "roomType": "Standard", "description": "A comfortable standard room." }, "cancellation": { "details": "Free cancellation up to 48 hours before check-in." } } ] } ] } } ``` #### Error Response (4xx/5xx) - **error** (object) - Contains error details. - **message** (string) - Error message describing the issue. ``` -------------------------------- ### Partners API - Build Links Source: https://developers.vio.com/docs/category/partners-api Constructs various types of links for different purposes. ```APIDOC ## GET /build-links ### Description Build various types of links. ### Method GET ### Endpoint /build-links ### Parameters #### Query Parameters - **type** (string) - Required - The type of link to build (e.g., "booking", "offer"). - **params** (object) - Required - Parameters specific to the link type. ``` -------------------------------- ### Get Location Links Source: https://developers.vio.com/docs/Partners-API/openAPI-schema Retrieves provider links for a specific location. This endpoint is useful for obtaining booking or information URLs related to a particular place. ```APIDOC ## GET /locations/links ### Description Retrieves a list of provider links for a given location. This endpoint can be used to get direct links to booking sites or information pages for a specific place. ### Method GET ### Endpoint /locations/links ### Parameters #### Query Parameters - **placeName** (string) - Required - The name of the place for which to retrieve links. - **placeId** (string) - Optional - The place ID to search for. If provided, placeName will be ignored. - **country** (string) - Optional - The country name for the main place. Used to disambiguate places with the same name. - **currency** (string) - Optional - 3-char ISO 4217 currency code. Example: EUR. - **language** (string) - Optional - Language code for translations. Default is 'en'. - **checkIn** (date) - Optional - Check-in date in YYYY-MM-DD format. - **checkOut** (date) - Optional - Check-out date in YYYY-MM-DD format. - **userDevice** (string) - Optional - The type of the user's device. Allowed values: 'desktop', 'mobile', 'tablet'. Default: 'desktop'. - **anonymousId** (string) - Optional - Unique ID identifying users. - **label** (string) - Optional - Arbitrary string for tracking and reporting. - **vioOnly** (boolean) - Optional - If true, returns only Vio.com location links. ### Request Example ```json { "placeName": "Eiffel Tower", "country": "France", "language": "en", "userDevice": "mobile", "anonymousId": "another-anonymous-id", "label": "tower_info_request" } ``` ### Response #### Success Response (200) - **links** (array of ProviderLink objects) - The list of providers links. #### Response Example ```json { "links": [ { "providerName": "TravelGuide", "url": "https://travelguide.com/eiffel-tower" }, { "providerName": "BookingsNow", "url": "https://bookingsnow.com/hotel/eiffel-tower-area" } ] } ``` ``` -------------------------------- ### GET /v1/list Source: https://developers.vio.com/docs/Partners-API/list Retrieves a list of id-value pairs for a specified entity. Supports filtering by entity type and language. ```APIDOC ## GET /v1/list ### Description Retrieves a list of id-value pairs for a given entity. This endpoint is useful for fetching predefined lists such as property types, themes, or facilities. ### Method GET ### Endpoint `https://partners.api.vio.com/v1/list` ### Headers - **X-Partner-Key** (string) - Required - Partner's profile key. - **Accept-Encoding** (string) - Optional - Specifies the content encoding (e.g., `gzip, deflate, br`). ### Query Parameters - **entity** (string) - Required - The entity for which to retrieve the list. Accepted values: `propertyType`, `theme`, `facility`. - **language** (string) - Optional - Language code for translating values. Defaults to `en`. ### Request Example ```bash curl --location --request GET 'https://partners.api.vio.com/v1/list?entity=propertyType&language=en' \ --header 'X-Partner-Key: ' ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the list item. - **value** (string) - The display value for the list item. #### Response Example ```json [ { "id": "1", "value": "Apartment" }, { "id": "2", "value": "House" } ] ``` ``` -------------------------------- ### POST /v1/build-links Source: https://developers.vio.com/docs/Partners-API/build-links Builds a home page link or search page links based on the provided parameters. It accepts parameters for either home page links or search page links, or both. ```APIDOC ## POST /v1/build-links ### Description This endpoint allows you to build various types of links, including home page links and search page links. ### Method POST ### Endpoint `https://partners.api.vio.com/v1/build-links` ### Headers - **X-Partner-Key** (string) - Required - Partner's profile key - **Content-Type** (string) - Required - `application/json` - **Accept-Encoding** (string) - Optional - `gzip, deflate, br` ### Request Body - **homePageLinkParams** (HomePageLinkParams) - Optional - Parameters for building a home page link. - **searchPageLinkParams** (SearchPageLinkParams) - Optional - Parameters for building search page links. #### HomePageLinkParams - **label** (string) - Optional - Arbitrary string for tracking and reporting. #### SearchPageLinkParams - **label** (string) - Optional - Arbitrary string for tracking and reporting. - **urls** (string[]) - Optional - The list of hotel or place URLs from Vio.com. ### Request Example ```json { "homePageLinkParams": { "label": "test" } } ``` ### Response #### Success Response (200) - **homePageLink** (string) - Home page link if `homePageLinkParams` were provided. - **searchPageLinks** (string[]) - The list of search page links if `searchPageLinkParams` were provided. The order is the same as in the `searchPageLinkParams.urls`. #### Response Example ```json { "homePageLink": "https://partners.api.vio.com/v1/build-links?label=test", "searchPageLinks": [ "https://www.vio.com/Hotel/Search?hotelId=1103101&checkIn=2023-10-08&checkOut=2023-10-09&rooms=2&userSearch=1&homeSearch=1", "https://www.vio.com/Hotel/Search?placeId=24399&checkIn=2023-08-24&checkOut=2023-08-25&rooms=2&userSearch=1&homeSearch=1" ] } ``` ``` -------------------------------- ### Get Nearby Places Source: https://developers.vio.com/docs/Partners-API/openAPI-schema Retrieves a list of nearby places based on specified criteria such as location, dates, and desired place categories. Supports filtering by country, currency, and language. ```APIDOC ## GET /places/nearby ### Description Retrieves a list of nearby places based on provided criteria. This endpoint allows searching for places like cities, landmarks, or airports, optionally filtering by date ranges and specific categories. ### Method GET ### Endpoint /places/nearby ### Parameters #### Query Parameters - **placeName** (string) - Required - The name of the place to search for. - **placeId** (string) - Optional - The place ID to search for. If provided, placeName will be ignored. - **checkIn** (date) - Optional - Check-in date in YYYY-MM-DD format. - **checkOut** (date) - Optional - Check-out date in YYYY-MM-DD format. - **country** (string) - Optional - The country name for the main place. Used to disambiguate places with the same name. - **currency** (string) - Optional - 3-char ISO 4217 currency code. Example: EUR. - **hits** (integer) - Optional - Maximum number of results to return. Default is 10. Maximum is 1000. - **language** (string) - Optional - Language code for translations. Default is 'en'. - **placeCategories** (array of strings) - Optional - Nearby place categories to filter by. Examples: 'city', 'landmark'. - **userDevice** (string) - Optional - The type of the user's device. Allowed values: 'desktop', 'mobile', 'tablet'. Default: 'desktop'. - **anonymousId** (string) - Optional - Unique ID identifying users. - **label** (string) - Optional - Arbitrary string for tracking and reporting. - **vioOnly** (boolean) - Optional - If true, returns only Vio.com location links. ### Request Example ```json { "placeName": "Paris", "checkIn": "2023-10-26", "checkOut": "2023-10-28", "country": "France", "currency": "EUR", "hits": 20, "language": "en", "placeCategories": ["city", "landmark"], "userDevice": "desktop", "anonymousId": "some-anonymous-id", "label": "search_campaign_1", "vioOnly": false } ``` ### Response #### Success Response (200) - **links** (array of ProviderLink objects) - The list of providers links. #### Response Example ```json { "links": [ { "providerName": "Example Provider", "url": "https://example.com/search?destination=Paris" } ] } ``` ``` -------------------------------- ### Suggest Hotels using cURL Source: https://developers.vio.com/docs/Partners-API/suggest This snippet shows how to use cURL to retrieve hotel suggestions based on a search query. It requires the 'query' parameter and the 'X-Partner-Key' header. ```bash curl --location --request GET 'https://partners.api.vio.com/v1/suggest?query=Park plaza hotel' \ --header 'X-Partner-Key: ' ``` -------------------------------- ### POST /build-links Source: https://developers.vio.com/docs/Partners-API/openAPI-schema Builds various types of links by sending a request with the necessary parameters. It's designed to create deep links for different purposes within the Vio.com platform. ```APIDOC ## POST /build-links ### Description Build various types of links. ### Method POST ### Endpoint /build-links ### Parameters #### Request Body - **(object)** - Required - BuildLinksRequest schema definition. ### Request Example ```json { "example": "request body for BuildLinksRequest" } ``` ### Response #### Success Response (200) - **(object)** - OK - BuildLinksResponse schema definition. #### Response Example ```json { "example": "response body for BuildLinksResponse" } ``` #### Error Responses - **400** - Bad Request - **401** - Unauthorized - **429** - Too Many Requests - **500** - Internal Server Error ``` -------------------------------- ### GET /list Source: https://developers.vio.com/docs/Partners-API/openAPI-schema Retrieves a list of ID-value pairs for a specified entity, optionally translated into a given language. This is useful for fetching enumerated values like property types or themes. ```APIDOC ## GET /list ### Description Get list of id value pairs for a given entity. ### Method GET ### Endpoint /list ### Parameters #### Query Parameters - **entity** (string) - Required - Entity of the list. Enum: theme, propertyType, facility - **language** (string) - Optional - Language code to translate values in the list. Example: en. Enum: ar, bg, ca, cs, cz, da, de, el, en, en-GB, es, et, fi, fr, he, hr, hu, id, is, it, iw, ja, ko, lt, lv, ms, nl, no, nb, nn, pl, pt, pt-BR, ro, ru, sk, sl, sr, sv, th, tl, tr, uk, vi, zh, zh-CN, zh-TW, zh-HK ### Response #### Success Response (200) - **(array of ListItem objects)** - OK #### Response Example ```json { "example": "response body for ListItem array" } ``` #### Error Responses - **400** - Bad Request - **401** - Unauthorized - **429** - Too Many Requests - **500** - Internal Server Error ```