Viator API Documentation & Specification - Affiliate Partners (1.0)

Download OpenAPI specification:Download

Viator Partner Support Team: affiliateapi@tripadvisor.com License: CC BY 4.0

Updates

Date Description
26 May 2022 Added advice about review authenticity: Key concepts - Review authenticity
11 Feb 2022 Added note about no-index policy to /attraction, /attraction/photos, /attraction/reviews and /search/attractions endpoints
16 Sep 2021 Removed topX and modified options for sortOrder request parameters in /attraction/reviews/ endpoint
6 Sep 2021 Modified available options for sortOrder request parameter in /taxonomy/attractions and /search/attractions endpoints
3 March 2021 Added currencyCode request parameter to /attraction/products
19 Feb 2021 Removed /support/terms and /support/faq endpoints
3 Feb 2021 Added Special offers and on-sale pricing section
9 June 2020 Updated Supported currencies section and /product endpoint description to reflect multiple currencies now being enabled for all accounts by default
2 June 2020 Updated Postman collections and Testing section
20 May 2020 Updated Postman collection
19 May 2020 Recompiled with latest version of ReDoc (0.9.8)
22 Apr 2020 Revised list of available languages
21 Apr 2020 Regenerated all endpoint examples
20 Apr 2020 Updated Overview section to be more specific to the Content Affiliate partner type
10 Mar 2020 Created new Overview section

Overview

The API exposes a variety of services that allow the retrieval of all product details, such as descriptions, pricing, terms and conditions, photos and reviews. This data can either be ingested periodically and managed on your local system, or calls can be made in real time to retrieve content in response to your users' activity on your systems.

The API provides product content and availability functionality, along with various utility services to map between yours and Viator's data taxonomy.

Who is the API for?

The Viator Partner API is designed for use by organizations and individuals partnered with Viator as a Viator Branded Affiliate (VBA).

Viator Branded Affiliates (VBAs)

VBAs have full access to the areas of the API relating to content, but sales of Viator products must be carried out on the Viator site itself; therefore, access to the booking or transactional endpoints necessary to operate as the merchant of record (i.e., merchant partners) is restricted.

When a customer wishes to book a product from a VBA partner's site, they are instead redirected to viator.com in order to complete the purchase; whereas, merchant partners are able to process and manage bookings through the Viator API itself, allowing their customers to book products without leaving the partner's site.

Viator affiliates instead generate unique URLs that redirect their users to the Viator site, resulting in a cookie being set such that all transactions will accrue a commission for that partner until the cookie expires.

Purchases of products originating from the VBAs site are recorded and a commission on these sales is paid periodically.

Uses of the Viator Partner API

The Viator Partner API is used to carry out the following tasks:

Product search and ingestion

Partners can use the product search endpoints to retrieve lists of products from Viator’s inventory relevant to their business. The available search criteria include:

  • The location (destination) in which the product operates
  • Whether the product is associated with a well-known tourist attraction; e.g., Empire State Building
  • The type of product (known as its category and/or subcategory)
  • The time period during which the product operates
  • Words or phrases that occur in a product's description via a free-text search

Partners who prefer to download product details periodically (instead of performing all operations in real time in response to user behavior) do so by using the product search endpoints to compile a list of products that they wish to sell on their site. They then download comprehensive product details for each via the /product endpoint.

Product search endpoints:

Endpoint Use
/search/products Allows searching for products according to: destination / location, relationship to a known tourist attraction; category and/or subcategory; date of operation
/search/products/codes Retrieves product details for products that match a list of product codes (unique identifiers for the product)
/search/freetext Retrieves product details for products that include the search terms in the product's description and details.
/available/products Retrieves products that are identified by specific product codes, operate during a specified day range and accept a certain number of adult travelers

Product information endpoints:

All information about a product that must be communicated to customers prior to purchase is available via /product and its auxiliary endpoints. This content is generally used to construct product display pages and for performing local searches.

Important information about a product includes:

  • Product and supplier names
  • Geographic location
  • Product description
  • Category and subcategory
  • Photos (from both users and the supplier)
  • User reviews and ratings
  • Product options (variants of the tour/activity, such as starting times, passenger mix options, and inclusions/add-ons, including basic pricing information for each)
  • Which age ranges can participate
  • Booking details
  • Terms and conditions
  • Basic pricing
  • Logistics
    • Inclusions (e.g., provided meals)
    • Exclusions (e.g., entrance fees to visited attractions)
    • Health restrictions and accessibility
    • Departure times
    • Passenger pick-up
    • Duration
    • Tour routes

Auxiliary services

Taxonomical data sets are required to interact meaningfully with the Viator Partner API; for example, mappings from destination (location of operation) to their respective identification codes. This information may occasionally change or be added to. Consequently, the API includes endpoints that return the most up-to-date versions of this information.

Taxonomy endpoints

Endpoint Use
/taxonomy/destinations Retrieves a list of destination names, types and unique identifiers to be used when interacting with the Viator Partner API
/taxonomy/categories Retrieves a list of product categories for a destination that can be used as a means of filtering when searching for products using the /search/products endpoint
/taxonomy/attractions Retrieves a list of tourist attractions (e.g., the Eiffel Tower or Empire State Building) and their associated identification codes to be used as a means of searching for available products; for example, in the /search/products service
/booking/hotels Retrieves a list of hotels, including names and geographic locations, to be used when making booking requests

Utility endpoints

The following services are available that provide basic utility services to support the use of the API:

Endpoint Use
/util/ip2country Returns the country-code for the country in which the IP is located.
/util/sitedetails Returns the site settings for your organization
/util/countrymap Returns a dictionary mapping coutry-codes to their natural-language names and international dialling prefixes
/util/guid Generates and returns a GUID for general use
/util/siteBinaryData Returns custom information for a partner, such as a logo, favicon or quick links

Attraction services

Viator has a large database of attractions and traveler recommendations. These are associated with a destination and have their own photos and reviews as well as associated products that consumers can purchase.

An example Attraction is the Eiffel Tower. Viator sells a number of products that take customers to the tower and these are associated for cross selling purposes.

Recommendations are authored by Viator and our customers and include recommended itineraries for visiting a city or favorite restaurants, etc.

The attraction endpoints can be used to get the attractions or recommendation lists, details and associated products, photos and reviews.

Attractions and recommendations have a unique ID called the seoId. This is the unique identifier for an attraction and is available in the following services.

Endpoint Use
/search/attractions Returns a list of attractions associated with the given destination
/attraction Returns the details of an attraction.
/attraction/reviews Returns reviews related to an attraction. These reviews might be associated indirectly through the related products.
/attraction/photos Returns photos that are related to an attraction (these may be associated indirectly if they are photos of products related to the attraction)

Customer support services

The links to the terms and conditions, FAQ and customer care page is available to VBA partners.

The following services are available:

Endpoint Use
/support/terms Returns the URL for the terms and conditions.
/support/FAQ Returns the URL to the FAQ page that the partner can link to within their app / website
/service/support/customercare Returns the URL to the customer care page that the partner can link to within their app / website.

Authentication

API key

Access to the API is managed using an API key that must be included as a header parameter to every call made to all API endpoints described in this document.

Header parameter name Example value
exp-api-key bcac8986-4c33-4fa0-ad3f-75409487026c

If you do not know the API key for your organization, please contact your business development account manager for these details.

When using this type of key, you must also include in your request the language you wish your response localized to via the Accept-Language header parameter. See Accept-Language header for available language codes. Please note that, at present, only the language configured for your organization's point of sale will be available.

Legacy API key

Previously, authenticating to this API was accomplished by passing an API-key as a query parameter appended to the URI for each call; e.g.:

GET https://viatorapi.viator.com/service/taxonomy/destinations?apiKey=xxxxxxxxxxxxxxxxxx

While this method of authentication remains available for backwards-compatibility, if you are still using this method for authentication, we recommend you contact your business development account manager to ask for a new-style API key as soon as possible.

Key concepts

Content ingestion and caching strategy

Much of the information you will need to retrieve from the Viator API – such as the taxonomy, product lists and product details – do not change frequently.

Therefore, we recommend implementing a caching strategy in order to eliminate unnecessary traffic to Viator’s servers and improve the operation of your site.

This section discusses the different strategies for retrieving and caching Viator’s product catalogue.

You will need to decide on how you will retrieve and manage content from Viator’s product catalogue. The two main options are as follows:

1. API response caching

Partners retrieve content as-needed and cache responses on a service-by-service basis

If you do not need to store product details locally, we recommend performing caching of on a service-by-service basis; i.e., storing the entire response and applying a time-to-live (TTL) of less than 24 hours.

Benefits of API response caching

  • All the benefits of caching with minimal overhead
  • Minimal risk of serving stale or invalid data cached on the partner's side
  • No need to download data about products that are not selling
  • A smaller volume of local data improves cache hit performance
  • Fewer requests made of Viator's systems
  • Avoids rate limitations
  • Closer adherence to best practices
  • Removes need to manage a complex data structure locally

Service endpoints to cache

Caching should only be applied to services that yield infrequently changing data; i.e.:

Note: These services should be considered cacheable even though some are POST and no Cache-Control HTTP header is included in their response.

2. Periodic content ingestion

Partners download either the full product catalogue or a subset of the catalogue at regular intervals based on destination, linked attraction, or product category filters.

Who should use periodic ingestion

This approach may be preferable for partners whose requirements include:

  • System agnosticism/data centralization – i.e., partners who are simultaneously selling products from vendors other than Viator, have existing product databases or are likely to want to maintain a central product catalogue with a unified taxonomy / data structure
  • Enhanced search capability – i.e., the ability to apply different categorization rules, filters, exclusions or search optimizations to the product catalogue; e.g., grouping or filtering products according to criteria other than those supported directly by the Viator API (destination, attraction-link or category)

Frequency of content ingestion

We recommend that you perform an ingestion of the product catalogue once every 24 hours.

How to retrieve product codes

Make a call to one of the product search services:

  • /search/products – to search by destId (destination), catId (category), subCatId (subcategory) or seoId (attraction)
  • /search/freetext – free-text search across all identifying fields

How to retrieve all products in the catalogue

To retrieve all products from the Viator catalogue:

  • Retrieve all available destination identifiers (destId) from the /taxonomy/destinations service
  • Iterate through the complete list of destIds you retrieved in the previous step, and call /search/products for each destId

Note: As some products operate in multiple destinations, the same product code may be returned for a range of different destinations. Therefore, make sure your list of product codes only contains one copy of each code.

You may then iterate through this list of product codes to retrieve any other product details necessary in order to properly populate your local database with the information you require.

Retrieving a subsection of the product catalogue

You may wish to retrieve only some of the products available in the Viator catalogue; for example, if your organization is only interested in selling products that operate locally.

Your top level search using /search/products is restricted to one of the three main categorization methods for products; i.e., destination, category/subcategory, or attraction-link; however, you may employ your own methods to filter the selection of products based on any attribute in the product data structure.

Dealing with pagination using totalCount and topX

Due to the large number of results that can be returned by the /search/products service, the request might exceed the 30-second time-out limitation. Therefore, you will need to make multiple requests to this service including pagination information in order to retrieve all products that match your search criteria.

This is accomplished by sequentially requesting successive segments of the results using the topX request parameter together with the totalCount response field; i.e.:

  • For your first request, specify a topX of "1-100"
    • Note: this range is inclusive; i.e., "topX": 1-100" will yield the first 100 records
  • The first response will indicate the total number of records available through the value of the totalCount field in the response object; e.g.: "totalCount": 13843
  • For each subsequent request, specify the next logical 'chunk' of data via the topX parameter of the request; e.g.:
    • "topX": "1-100"
    • "topX": "101-200"
    • ...
    • "topX": "13801-13843"

Rate limiting

Due to the heavy load that pre-caching can place on Viator's servers and the downstream servers we connect to, we apply a rate limit of 150 requests per rolling 10 second time window.

Request rates exceeding this limit will result in a HTTP 429 (Too Many Requests) status code being returned.

Note: The rate is calculated over a rolling 10-second time window.

  • In order to avoid running-up against rate limits:
    • insert a delay of 2s if you receive a HTTP 429 status code
    • do not run this as a multi-threaded process

Categorization of content

The products available in Viator’s catalogue are mainly categorized according to:

  1. Destination: every product in the Viator catalogue is categorized according to the destination/locale in which it operates. There are three kinds of destination:

    Destination type Meaning
    “COUNTRY” A country; e.g., “Australia”, “Japan”, “USA”
    "REGION" A geographical region or state; e.g., “South Australia”, “French Riviera”, “Punjab”
    "CITY" A city within a state; e.g., “Townsville”, “Osaka”, “Singapore”
    destinationName destId destinationType
    USA 77 COUNTRY
    Wisconsin 22231 REGION
    Madison 24146 CITY
    France 51 COUNTRY
    Brittany 21942 REGION
    Rennes 21943 CITY
  2. Category and subcategory: the products in the Viator catalogue are grouped according to the kind of activity they entail and may be subcategorized further to provide greater specificity; for example:

    Category Subcategories
    Air, Helicopter & Balloon Tours Air Tours
    Helicopter Tours
    Balloon Rides
    Weddings & Honeymoons Wedding Packages
    Honeymoon Packages
  3. Attraction link (i.e., association to a particular "point of interest"); e.g.:

    Attraction `seoId`
    Bellagio Fountains 1243
    Black Canyon 4437
    Epcot Centre 1141

Localization and translation

Foreign language products

The products available through the Viator API have been created in a variety of languages, often by the suppliers of those products themselves.

Although the majority of these have been created in English, many have been created in other languages. For example, a tour that operates in Paris might have been created in French.

Viator provides translation services to localize product descriptions to the language of the locale in which they are being presented. In this way, products with descriptions – for example, in French – can be displayed in English on English-language websites. Conversely, products with English-language-descriptions can be displayed in French on French-language websites.

  • Note: product descriptions are translated into the language specified in the Locale header parameter in the request to each endpoint.

Human and machine translation

Some products have been translated by actual humans – 'human translated' – while others have been automatically translated using Google Translate – 'machine translated'.

The type of translation that has been applied to a product (if any) is indicated by its translationLevel, a numeric specifer with meanings as follows:

translationLevel Meaning
0 The product was created by the supplier in the language you specifed using the Locale header parameter in the request; i.e., the natural-language text in this response has not been translated
80 All product information has been machine translated
90 or 100 All product information has been human translated

Therefore, any product with a non-zero translationLevel has been translated.

The translationLevel field is returned in the response objects from the following services:

When performing a product search using any of these services, you will receive - by default - products with a translationLevel of:

  • 0 (products that are in the language you specified in Locale), and
  • 90 or 100 (products that have been fully human translated)

Accessing machine-translated products

If your implementation can support the large number of products available that are machine translated, you can.

However, access to the considerable volume of machine-translated products (level 80), is not granted by default, as there may be quality issues regarding automatically-translated text.

To access machine-translated products, you will need to request access from your business development account manager.

How to report a product issue

Occasionally, a product schema in the Viator database will contain incorrect or invalid information. Usually, this occurs due to a mistake made by the supplier of the product when creating the product or updating its details.

Nonetheless, it's in all our best interests for product information to be accurate and up-to-date; therefore, if you discover a problem with a product, we would greatly appreciate it if you could report the error through our product issue reporting form.

How to use the product issue reporting form

  1. Navigate to the product issue reporting page
  2. Fill in the Reporter, Supplier ID, Product Code and Booking ID fields:
Field How to fill it in Example
Reporter Enter your email address for tracking or correspondence you@emailserver.com
Supplier ID Enter the value returned in the supplierCode field by the /product service for the product in question. 3072
Product Code Enter the value returned in the code field by the /product service for the product in question. 3072LASALL
Booking ID Leave this field blank
  1. In the Reason box below, choose Content by clicking on its radio selector. A list of categories will appear, with meanings as follows:
Category Included issues
Additional Info clauses in the additionalInfo array in the response from /product; e.g., departure time or hotel pick-up information
Availability & Blockouts N/A
Booking Details N/A
Highlights highlights array items in the response from /product
Inclusions / Exclusions inclusions or exclusions array items in the response from /product
Images productPhotos and userPhotos returned by /product or /product/photos
Product Title title in the response from /product, /search/products, /search/products/codes and /search/products/freetext
Product Descriptions description and shortDescription in the response from /product
SAPI N/A
Tour Options & Pricing pricing issues; e.g. when the value of merchantNetPrice is 0; or, if merchantNetPrice > price
Taxonomy
Translation Incorrect mistakes in any natural-language field in the response from any service where translationLevel is non-zero
TVRM N/A
VUC incorrect N/A
  1. After selecting the category of issue from the options shown, fill-in the Description / Action Required box with a good, clear description of the problem and any specific additional actions you would like us to take
  2. Click Submit to send the report
Tripadvisor experiences report a product form
Example Report a Product Issue form

Once your report has been submitted, a member of our Supplier Support Team will contact the supplier of the product in question to resolve any problems with their listing.

Special offers and on-sale pricing

Suppliers have the option of setting special pricing deals for their products. When a product is 'on sale'; i.e., has a temporarily lowered price, it will be reflected in the product content response, as follows:

Field name Standard pricing Special offer / on-sale pricing
specialOfferAvailable false true
specialOffer "" (empty string) e.g.: "Book by February 28 to save 10%"
rrp 0.0 pre-discount price
rrpFormatted "" (empty string) currency-formatted pre-discount price
onSale false true
price standard price special offer price
priceFormatted currency-formatted standard price currency-formatted special-offer price
priceFrom (in tourgrades) standard price special-offer price
priceFromFormatted (in tourgrades) currency-formatted standard price currency-formatted special-offer price
savingAmount 0.0 (rrp - priceFrom)
savingAmountFormated "" (empty string) (rrp - priceFrom) currency formatted

You can use this information to highlight which products are on special and provide details to the user about the special offer.

Making a booking

Affiliate partners do not manage any aspect of the booking process. Instead, users on the affiliate's site click the link to the tour, which is provided in the webURL field in the product details in the responses from:

Review authenticity

Viator performs checks on reviews

You can only submit a review or rating of an experience to Viator if you were the person who made the booking through Viator. Before publication, each review goes through an automated tracking system, which collects information for each of the following criteria: who, what, how, and when.

If the system detects something that contradicts our publication criteria, the review is not published. When the system detects a problem with a review, it may be automatically rejected, sent to the reviewer for validation, or manually reviewed by our team of content specialists who work 24/7 to maintain the quality of the reviews on our site. In some cases, we will also send Viator customers an email asking them to validate their review before it is published.

All Viator customers need to do is click on the link provided in the email.

After publication, our team checks each review reported to it as not meeting our publication criteria. Tripadvisor reviews that appear on the Viator site are subject to the same checks and moderation processes as set out above. It is not necessary to have booked an experience through Viator (or Tripadvisor) to submit a review of an experience to the Tripadvisor site.

Testing

Postman collection for testing

To facilitate your testing of the APIs functionality, please use the following collection, which can be loaded into the [Postman](https://www.getpostman.com/) API development environment via its **import** function.

Setting up API-key authentication in Postman

Before you start using the linked Postman collection for testing, you will need to set up the authorization method you wish to use. This can be either the new method (the exp-api-key header parameter) or, the legacy method (the apiKey query parameter).

While both methods remain available, we strongly recommend that you use the new method, as it:

  1. Provides access to all languages available for your organization with a single API-key as opposed to one API-key per language
  2. Allows access to the new booking cancellation endpoints, as well as all newly-created endpoints in future

Please speak to your account manager if you are still using the legacy apiKey and would like to switch to our new authentication mechanism.

How to set up the new exp-api-key header parameter

  1. Select Edit from the collection menu:

postman-testing-1

  1. Set the following values:
  • Key: exp-api-key
  • Value: Your organization's single exp-api-key, which will have an identical format to that shown in the image below
  • Add to: Header

postman-testing-2

  1. Click Update

How to set up the legacy apiKey query parameter

  1. Select Edit from the collection menu:

postman-testing-1

  1. Set the following values:
  • Key: apiKey
  • Value: One of your organization's legacy apiKeys, which will have an identical format to that shown in the image below
  • Add to: Query Params

postman-testing-3

  1. Click Update

Appendices

Accept-Language header

The Accept-Language header parameter controls which language the natural language fields in the response from each endpoint will be translated into.

Note that you can only specify languages that have been configured for your API-key. Therefore, if you wish to access additional languages, you will need to contact your business development account manager.

Language Accept-Language parameter value
English en, en-US
Danish da, da-DK
Dutch nl, nl-NL
Norwegian no, no-NO
Spanish es, es-ES
Swedish sv, sv-SE
French fr, fr-FR
Italian it, it-IT
German de, de-DE
Portuguese pt, pt-PT
Japanese ja, ja-JP

Standard JSON fields

Every service returns a standard set of JSON fields at the end of the JSON response, which indicates if it was processed successfully by the API.

In addition to the success flag, you will also need to check the errorMessage values for the status of the response. Success: true and errorType / errorMessage null indicates that there were no errors.

Example JSON - successful:

{
  "data": [],
  "vmid": "321001",
  "errorMessage": null,
  "errorType": null,
  "dateStamp": "2013-03-06T19:45:10+0000",
  "errorReference": null,
  "errorMessageText": null,
  "success": true,
  "totalCount": 114,
  "errorName": null
}

Example JSON - unsuccessful:

{
  "errorReference": "~5793740141815885188840666",
  "data": null,
  "dateStamp": "2013-09-09T11:29:48+0000",
  "errorType": "EXCEPTION",
  "errorMessage": ["* Additional questions missing\n"],
  "errorName": "ValidationException",
  "success": false,
  "totalCount": 1,
  "vmid": "221001",
  "errorMessageText": ["* Additional questions missing" ]
}
Element Type Comments To be viewed by customer Required
vmid varchar The server id that processed the service
errorMessage varchar The error message in HTML
errorType varchar Type of error: EXCEPTION
dateStamp datetime timestamp of the response
errorReference varchar The error reference is logged for future reference
errorMessageText varchar The textual version of the error message
(if an error has occurred)
success boolean
  • true if the API request was successful with no errors
  • false if an error was encountered
totalCount smallint The number of results returned (minimum = 1)
(if displaying the number of results found in a search etc.)
errorName varchar The name of the error type

Country codes

Country code Country
AF Afghanistan
AL Albania
DZ Algeria
AS American Samoa
AD Andorra
AO Angola
AI Anguilla
AQ Antarctica
AG Antigua and Barbuda
AR Argentina
AM Armenia
AW Aruba
AU Australia
AT Austria
AZ Azerbaijan
BS Bahamas
BH Bahrain
BD Bangladesh
BB Barbados
BY Belarus
BE Belgium
BZ Belize
BJ Benin
BM Bermuda
BT Bhutan
BO Bolivia
BA Bosnia Herzegovina
BW Botswana
BR Brazil
BN Brunei
BG Bulgaria
BF Burkina Faso
BI Burundi
KH Cambodia
CM Cameroon
CA Canada
CV Cape Verde
KY Cayman Islands
CF Central Africa
TD Chad
CL Chile
CN China
CX Christmas Island
CC Cocos (Keeling) Islands
CO Colombia
KM Comoros
CK Cook Islands
CR Costa Rica
CI Cote D'Ivoire
HR Croatia
CY Cyprus
CZ Czech Republic
DK Denmark
DJ Djibouti
DM Dominica
DO Dominican Republic
EC Ecuador
EG Egypt
SV El Salvador
GQ Equatorial Guinea
ER Eritrea
EE Estonia
ET Ethiopia
FK Falkland Island
FO Faroe Islands
FJ Fiji
FI Finland
FR France
GF French Guiana
PF French Polynesia
GA Gabon
GM Gambia
GE Georgia
DE Germany
GH Ghana
GI Gibraltar
GR Greece
GL Greenland
GD Grenada
GP Guadeloupe
GU Guam
GT Guatemala
GN Guinea
GW Guinea Bissau
GY Guyana
HT Haiti
HN Honduras
HK Hong Kong
HU Hungary
IS Iceland
IN India
ID Indonesia
IQ Iraq
IE Ireland
IL Israel
IT Italy
JM Jamaica
JP Japan
JO Jordan
KZ Kazakhstan
KE Kenya
KI Kiribati
KW Kuwait
KG Kyrgyzstan
LA Lao People's Democratic Republic
LV Latvia
LB Lebanon
LS Lesotho
LR Liberia
LY Libyan Arab Jamahiriya
LI Liechtenstein
LT Lithuania
LU Luxembourg
MO Macau
MK Macedonia
MG Madagascar
MW Malawi
MY Malaysia
MV Maldives
ML Mali
MT Malta
MQ Martinique
MR Mauritania
MU Mauritius
YT Mayotte
MX Mexico
FM Micronesia
MD Moldova
MC Monaco
MN Mongolia
MS Monserrat
MA Morocco
MZ Mozambique
NA Namibia
NR Nauru
NP Nepal
NL Netherlands
AN Netherlands Antilles
KN Nevis- St Kitts
NC New Caledonia
NZ New Zealand
NI Nicaragua
NE Niger
NG Nigeria
NU Niue
NF Norfolk Island
KP North Korea
MP Northern Mariana Islands
NO Norway
OM Oman
PK Pakistan
PW Palau
PS Palestinian Territory, Occupied
PA Panama
PG Papua New Guinea
PY Paraguay
PE Peru
PH Philippines
PN Pitcairn
PL Poland
PT Portugal
PR Puerto Rico
QA Qatar
RE Reunion
RO Romania
RU Russian Federation
RW Rwanda
SH Saint Helena
LC Saint Lucia
SM San Marino
ST Sao Tome and Principe
SA Saudi Arabia
SN Senegal
YU Serbia and Montenegro
SC Seychelles
SL Sierra Leone
SG Singapore
SK Slovakia
SI Slovenia
SB Solomon Islands
SO Somalia
ZA South Africa
KR South Korea
ES Spain
LK Sri Lanka
PM St Pierre Miquelon
VC St Vincent and Grenadines
SR Suriname
SZ Swaziland
SE Sweden
CH Switzerland
SY Syria
TW Taiwan
TJ Tajikistan
TZ Tanzania
TH Thailand
TL Timor-Leste
TG Togo
TK Tokelau
TO Tonga
TT Trinidad and Tobago
TN Tunisia
TR Turkey
TM Turkmenistan
TC Turks and Caicos Islands
TV Tuvalu
UG Uganda
UA Ukraine
AE United Arab Emirates
GB United Kingdom
UY Uruguay
UM US Minor Outlying Islands
US United States of America
UZ Uzbekistan
VU Vanuatu
VE Venezuela
VN Vietnam
VG Virgin Islands-British
VI Virgin Islands-US
WF Wallis and Futuna Islands
WS Western Samoa
YE Yemen Republic
ZM Zambia
ZW Zimbabwe

US state codes

State code State
AL Alabama
AK Alaska
AZ Arizona
AR Arkansas
CA California
CO Colorado
CT Connecticut
DE Delaware
DC District of Columbia
FL Florida
GA Georgia
HI Hawaii
ID Idaho
IL Illinois
IN Indiana
IA Iowa
KS Kansas
KY Kentucky
LA Louisiana
ME Maine
MD Maryland
MA Massachusetts
MI Michigan
MN Minnesota
MS Mississippi
MO Missouri
MT Montana
NE Nebraska
NV Nevada
NH New Hampshire
NJ New Jersey
NM New Mexico
NY New York
NC North Carolina
ND North Dakota
OH Ohio
OK Oklahoma
OR Oregon
PA Pennsylvania
RI Rhode Island
SC South Carolina
SD South Dakota
TN Tennessee
TX Texas
UT Utah
VT Vermont
VA Virginia
WA Washington
WV West Virginia
WI Wisconsin
WY Wyoming

Canadian provinces

Code Province
Alberta Alberta
British Columbia British Columbia
Manitoba Manitoba
New Brunswick New Brunswick
Newfoundland and Labrador Newfoundland
Northwest Territories Northwest Territories
Nova Scotia Nova Scotia
Nunavut Nunavut
Ontario Ontario
Prince Edward Island Prince Edward Island
Quebec Quebec
Saskatchewan Saskatchewan
Yukon Yukon Territory

Australian states

Code State
ACT Australian Capital Territory
NSW New South Wales
NT Northern Territory
QLD Queensland
SA South Australia
TAS Tasmania
VIC Victoria
WA Western Australia

Supported currency codes

Supported currency codes for affiliate partners:

Currency code Currency
USD US dollar
GBP British pound
EUR Euro
AUD Australian dollar
HKD Hong Kong Dollar
SGD Singapore Dollar
CHF Swiss Franc
JPY Japanese Yen
NOK Norwegian Krone
CAD Canadian Dollar
NZD New Zealand Dollar
INR Indian Rupee
BRL Brazillian Lire
ZAR South African Rand
DKK Danish Krone
SEK Swedish Krona

Exception error codes

Error code Services Error message Description
ATTRIBUTE_NOT_FOUND /product
TOUR_GONE /product "We're sorry, we cannot find the tour, activity r attraction you are looking for" no product corresponding to the supplied details was found
TOUR_NOT_FOUND /product "We're sorry, we cannot find the tour, activity or attraction you are looking for" no product corresponding to the supplied details was found
UNKNOWN_ERROR any any the API reports this error when the exception from the underlying system (e.g. booking server) is not recognized

Utility services

Utility services

/util/sitedetails

Get site details – show the site settings for your organization

Authorizations:
API-keyLegacy-API-key
query Parameters
defaultCurrencyCode
string
Example: defaultCurrencyCode=USD

currency code (default) for pricing

  • countries with standard currencies will default to this currency for pricing display prices displayed in this currency as the default currency
  • other countries will default to 'USD'
  • e.g., Australia would be 'AUD'; Vietnam would be 'USD'
  • See: supported currencies
centralURL
any
Example: centralURL=alllasvegastours.com

URL for multi-URL sites that have a central URL for processing etc like www.alllasvegastours.com has content.allsightseeingtours.com

header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

object

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": {
    },
  • "dateStamp": "2020-04-21T17:22:00+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331003"
}

/util/countrymap

Get a dictionary mapping coutry-codes to their natural-language names and international dialling prefixes

Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

object

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": {
    },
  • "dateStamp": "2020-04-21T17:10:10+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331001"
}

/util/guid

This service can be used to generate a GUID if necessary

Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

data
string

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": "331003-1969648698962354-6150751091453490107",
  • "dateStamp": "2020-04-21T17:14:06+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331003"
}

/util/siteBinaryData

Get partner custom information, such as Logo, Favicon or quick links (only necessary for some partners)

Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Request Body schema: application/json
partnerCustomTypes
Array of strings
Items Enum: "LOGO" "LOGO_URL" "FAVICON" "HEADER_HTML" "FOOTER_HTML" "CSS"
  • LOGO - show base64-encoded data of partner's logo
  • LOGO_URL - show base64-encoded data of partner's logo URL
  • FAVICON - show base64-encoded data of partner's favicon
  • HEADER_HTML - show base64-encoded data of the partner's header HTML
  • FOOTER_HTML - show base64-encoded data of the partner's footer HTML
  • CSS - show base64 based data of partner Site CSS

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

object

Request samples

Content type
application/json
{
  • "partnerCustomTypes": [
    ]
}

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": {
    },
  • "dateStamp": "2020-04-21T17:20:24+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331001"
}

Taxonomy services

Taxonomy services

/taxonomy/destinations

  • Retrieves all the country taxonomy/city nodes as a flat list
  • Returns a complete list of Viator destinations, including destination names and parent identifiers
  • Used to provide navigation through drill down lists or combo boxes
Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

array of destination objects

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T23:56:25+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331001"
}

/taxonomy/categories

  • Retrieves a list of product categories for a destination that can be used as a means of filtering when searching for products using the /search/products service
  • This service can be used to get a list of all categories and subcategories for a destination by including its destId, or you can omit the destId to get a list of all categories and subcategories
  • Note: If no destId is passed, productCount and thumbnailURL will be null as they are destination-specific fields
Authorizations:
API-keyLegacy-API-key
query Parameters
destId
integer
Example: destId=684

unique numeric identifier of the destination to enquire about (optional)

header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

array of category data objects

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T23:59:14+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331004"
}

/taxonomy/attractions

  • Retrieves a list of attractions (things like the Eiffel Tower or Empire State Building) and their associated unique numeric identifiers
  • The attraction's identifier (seoId) can be used as a means of searching for available products; for example, in the /search/products service.
Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Request Body schema: application/json
destId
integer

unique numeric identifier of the destination in which to search for attractions

topX
string (topX)

start and end rows to return in the format {start}-{end}

  • e.g. '1-10', '11-20'
  • maximum number of rows per request is 100
  • therefore, '100-400' will return the same as '100-200'
  • if topX is not specified, the default is '1-100'
sortOrder
string

Sort order for the results; one of:

  • 'RECOMMENDED' – sorted in order of recommendation (Note: What Viator gets paid impacts this sort order)
  • 'SEO_ALPHABETICAL' – Alphabetical (A->Z)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

Request samples

Content type
application/json
{
  • "destId": 684,
  • "topX": "1-3",
  • "sortOrder": "RECOMMENDED"
}

Response samples

Content type
application/json
{}

Product services

Product services

/search/products

This service is used to search for products based on various criteria; such as:

  • the destination (locale) in which it operates
  • its association with a tourist attraction
  • its category and/or subcategory
  • the time period during which it operates

The fields you include in the request body for this service determine the kind of search that will be performed.

Note:

  • You can search EITHER by destination (destId) OR by attraction-link (seoId), but not both.
  • The destination identifier (destId) can be retrieved from the /taxonomy/destinations service.
  • The category (catId) and subcategory (subCatId) identifiers can be retrieved from the /taxonomy/categories service.
  • The attraction identifier (seoId) can be retrieved from the /taxonomy/attractions service.

Examples:

Search by destination:

  • E.g., "Top ten highest-rated yoga classes operating in Las Vegas:
    {
      "destId": 684,
      "subCatId": 26052,
      "sortOrder": "REVIEW_AVG_RATING_D",
      "topX": "1-3"
    }
    

Search by attraction-link:

  • E.g., "Products related to Everglades National Park operating 21-26 May 2019 in order of descending price":
    {
      "seoId": 1115,
      "startDate": "2019-05-21",
      "endDate": "2019-05-26",
      "sortOrder": "PRICE_FROM_D"
      "topX": "1-3"
    }
    
Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Request Body schema: application/json
destId
integer

unique numeric identifier of the destination in which to search for products

seoId
string

search restriction specifier for products associated with an attraction uniquely identified by seoId

  • use EITHER destId OR seoId, but not both
catId
integer

unique numeric identifier of this product category to search within

  • categoryId can be retrieved from the /taxonomy/categories service
  • at present, it is not possible to use catId in conjunction with seoId
subCatId
integer

unique numeric identifier of this product subcategory to search within

  • subcategoryId can be retrieved from the /taxonomy/categories service
  • at present, it is not possible to use subCatId in conjunction with seoId
startDate
string

start date delimiter for the search (must be in the future)

  • e.g., '2018-10-21'
endDate
string

end date delimiter for the search (must be in the future)

  • e.g., '2019-10-21'
currencyCode
string

currency in which to display product prices

topX
string (topX)

start and end rows to return in the format {start}-{end}

  • e.g. '1-10', '11-20'
  • maximum number of rows per request is 100
  • therefore, '100-400' will return the same as '100-200'
  • if topX is not specified, the default is '1-100'
sortOrder
string (sortOrder)
Enum: "TOP_SELLERS" "REVIEW_AVG_RATING_A" "REVIEW_AVG_RATING_D" "PRICE_FROM_A" "PRICE_FROM_D"

sort order in which to return the results that is one of:

  • 'TOP_SELLERS': the top sellers (Note: What Viator gets paid impacts this sort order)
  • 'REVIEW_AVG_RATING_A': ascending by average traveler rating (low -> high)
  • 'REVIEW_AVG_RATING_D': descending by average traveler rating (high -> low)
  • 'PRICE_FROM_A': ascending by price (low -> high)
  • 'PRICE_FROM_D': descending by price (high -> low)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

array of product objects

Request samples

Content type
application/json
Example
{
  • "destId": 684,
  • "subCatId": 26052,
  • "sortOrder": "REVIEW_AVG_RATING_A",
  • "topX": "1-3"
}

Response samples

Content type
application/json
Example
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T19:24:12+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 3,
  • "errorMessageText": null,
  • "vmid": "331001"
}

/search/products/codes

  • This service returns an array of products given an array of product identifiers that is useful for wishlist / shopping cart / user account display
  • Note: requesting an inactive or non-existent product code will return 0, null and blank values (as per the example below).
Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Request Body schema: application/json
currencyCode
string (currencyCode)

currency code for the currency to use for pricing fields

productCodes
Array of strings

array of product codes to search for

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

array of product objects

Request samples

Content type
application/json
{
  • "currencyCode": "USD",
  • "productCodes": [
    ]
}

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T21:02:27+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331001"
}

/search/freetext

  • This service provides a free text search across all products destinations, attractions and recommendations
  • The text parameter is required
  • Note: results include a type indicator (type) that you can use to display each result appropriately based on its content
Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Request Body schema: application/json
destId
integer

unique numeric identifier of the destination to search within

topX
string (topX)

start and end rows to return in the format {start}-{end}

  • e.g. '1-10', '11-20'
  • maximum number of rows per request is 100
  • therefore, '100-400' will return the same as '100-200'
  • if topX is not specified, the default is '1-100'
currencyCode
string (currencyCode)

currency code for the currency to use for pricing fields

text
string

text to search for

searchTypes
Array of strings
Items Enum: "PRODUCT" "DESTINATION" "ATTRACTION" "RECOMMENDATION"

array of search domain specifiers where each item is one of:

  • 'PRODUCT': a tour / activity
  • 'DESTINATION': continent, country, city, region
  • 'ATTRACTION': an attraction within a destination (only available to partners with SEO access)
  • 'RECOMMENDATION': an attraction within a destination (only available to partners with SEO access)
sortOrder
string (sortOrder)
Enum: "TOP_SELLERS" "REVIEW_AVG_RATING_A" "REVIEW_AVG_RATING_D" "PRICE_FROM_A" "PRICE_FROM_D"

sort order in which to return the results that is one of:

  • 'TOP_SELLERS': the top sellers (Note: What Viator gets paid impacts this sort order)
  • 'REVIEW_AVG_RATING_A': ascending by average traveler rating (low -> high)
  • 'REVIEW_AVG_RATING_D': descending by average traveler rating (high -> low)
  • 'PRICE_FROM_A': ascending by price (low -> high)
  • 'PRICE_FROM_D': descending by price (high -> low)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

array of search results

Request samples

Content type
application/json
{
  • "destId": 684,
  • "topX": "1-3",
  • "currencyCode": "USD",
  • "text": "helicopter",
  • "searchTypes": [
    ],
  • "sortOrder": "TOP_SELLERS"
}

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T21:07:44+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 124,
  • "errorMessageText": null,
  • "vmid": "331001"
}

/product

This service provides all product details required for a product display page, as well as information required for price checks and booking, such as:

  • age bands
  • tour grades (product options)
  • language options
  • booking questions
  • hotel pickup flags

currencyCode (in query):

  • Update: 9 Jun 2020: Multiple currencies are now enabled by default. Partners can choose to have the pricing displayed in any of the supported currencies.
  • Note: Regardless of the currency specified here, commissions will always be paid to affiliates in the main currency configured for their acccount.

Product photos

Update 13 Feb 2020: All supplier-provided photos for the selected product are now available in the productPhotos array in this endpoint's response. Previously, only two supplier-provided photos were available – one in the productPhotos array and one in thumbnailHiResURL.

Videos

  • Videos are no longer available
Authorizations:
API-keyLegacy-API-key
query Parameters
currencyCode
required
string
Example: currencyCode=EUR

currency code for the currency to use in this instance

  • Note: Commissions to Viator Affiliates will always be paid in the main currency configured for that account.
sortOrder
string
Enum: "REVIEW_RATING_A" "REVIEW_RATING_D" "REVIEW_RATING_SUBMISSION_DATE_D"
Example: sortOrder=REVIEW_RATING_A

specifier of the order in which to return reviews

Sort order options:

  • 'REVIEW_RATING_A': Traveler Rating (low→high) Average
  • 'REVIEW_RATING_D': Traveler Rating (high→low) Average
  • 'REVIEW_RATING_SUBMISSION_DATE_D': Most recent review
voucherOption
string
Enum: "VOUCHER_PAPER_ONLY" "VOUCHER_E" "VOUCHER_ID_ONLY"
  • "VOUCHER_PAPER_ONLY": Paper Vouchers only accepted
  • "VOUCHER_E": EVouchers + Paper Vouchers accepted
  • "VOUCHER_ID_ONLY": ID + Evouchers + Paper vouchers accepted
code
string
Example: code=5010SYDNEY

unique alphanumeric identifier of the product

showUnavailable
boolean

specifier as to whether or not to show 'unavailable' products:

  • true: return both available and unavailable products
  • false: return only available products (default)
excludeTourGradeAvailability
boolean

specifier:

  • true: return all tour grades, including those that are not available
  • false: only display tour grades that are available
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

object

object containing product details

Response samples

Content type
application/json
{}

/product/reviews

Get reviews of a product submitted by users

Note:

  • The number of reviews that you can obtain via this service will depend on whether your account is limited in terms of the number of reviews you are entitled to receive.

  • The number of reviews available through this service is given in the reviewCount element in the response from /product

  • Please speak to your account manager if you wish to receive more reviews. If your account is not limited, you will be able to receive all available reviews for this product.

  • Only reviews in the language specified in the Accept-Language request header will be returned

Viator performs checks on reviews

Example: "Get the first three reviews for product 5010SYDNEY sorted by rating in ascending order":


https://viatorapi.viator.com/service/product/reviews?sortOrder=REVIEW_RATING_A&topX=1-3&code=5010SYDNEY&showUnavailable=false
Authorizations:
API-keyLegacy-API-key
query Parameters
sortOrder
string
Enum: "REVIEW_RATING_A" "REVIEW_RATING_D" "REVIEW_RATING_SUBMISSION_DATE_D"
Example: sortOrder=REVIEW_RATING_A

specifier of the order in which to return reviews

Sort order options:

  • 'REVIEW_RATING_A': Traveler Rating (low→high) Average
  • 'REVIEW_RATING_D': Traveler Rating (high→low) Average
  • 'REVIEW_RATING_SUBMISSION_DATE_D': Most recent review
topX
string
Example: topX=1-3

start and end rows to return in the format {start}-{end}

  • e.g. '1-10', '11-20'
  • maximum number of rows per request is 100
  • therefore, '100-400' will return the same as '100-200'
  • if topX is not specified, the default is '1-100'
code
string
Example: code=5010SYDNEY

unique alphanumeric identifier of the product

showUnavailable
boolean

specifier as to whether or not to show 'unavailable' products:

  • true: return both available and unavailable products
  • false: return only available products (default)
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects (reviewObject)

array of review objects

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T21:49:43+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 10,
  • "errorMessageText": null,
  • "vmid": "331002"
}

/product/photos

Get photos of a product submitted by users

Authorizations:
API-keyLegacy-API-key
query Parameters
topX
string
Example: topX=1-3

start and end rows to return in the format {start}-{end}

  • e.g. '1-10', '11-20'
  • maximum number of rows per request is 100
  • therefore, '100-400' will return the same as '100-200'
  • if topX is not specified, the default is '1-100'
code
string
Example: code=5010SYDNEY

unique alphanumeric identifier of the product

showUnavailable
boolean

specifier as to whether or not to show 'unavailable' products:

  • true: return both available and unavailable products
  • false: return only available products (default)
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects (photoObject)

array of photo objects

Response samples

Content type
application/json
{}

/available/products

Gets available products by product code, date range or number of adult travelers

Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Request Body schema: application/json
currencyCode
string (currencyCode)

currency code for the currency to use for pricing fields

startDate
string

start date of the date range to search within (must be in the future)

endDate
string

end date of the date range to search within (must be in the future)

numAdults
integer

number of adult travelers who wish to participate

  • default: 1
productCodes
Array of strings

array of unique alphanumeric product identifiers specifying which products to find the availability of

  • maximum: 50

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

array of product objects

Request samples

Content type
application/json
{
  • "currencyCode": "USD",
  • "startDate": "2020-12-21",
  • "endDate": "202-12-31",
  • "numAdults": 1,
  • "productCodes": [
    ]
}

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T21:58:38+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331004"
}

Attraction services

Attraction services

/search/attractions

This service retrieves a list of attractions associated with the given destination

Note:

  • Pages generated using data from this endpoint are subject to a strict no-index policy. If you are unsure about whether you are correctly following this rule, please reach out to your account manager for advice.

Aliases:

Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Request Body schema: application/json
destId
integer

unique numeric identifier of the destination in which to search for attractions

topX
string (topX)

start and end rows to return in the format {start}-{end}

  • e.g. '1-10', '11-20'
  • maximum number of rows per request is 100
  • therefore, '100-400' will return the same as '100-200'
  • if topX is not specified, the default is '1-100'
seoType
any
Enum: "ATTRACTION" "RECOMMENDATION"

search specifier: one of 'ATTRACTION' or 'RECOMMENDATION'

sortOrder
string

Sort order for the results; one of:

  • 'RECOMMENDED' – sorted in order of recommendation (Note: What Viator gets paid impacts this sort order)
  • 'SEO_ALPHABETICAL' – Alphabetical (A->Z)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

Request samples

Content type
application/json
{
  • "destId": 684,
  • "topX": "1-3",
  • "seoType": "ATTRACTION",
  • "sortOrder": "RECOMMENDED"
}

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T22:11:05+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 71,
  • "errorMessageText": null,
  • "vmid": "331003"
}

/attraction

This service returns the details of an attraction.

Note:

  • Pages generated using data from this endpoint are subject to a strict no-index policy. If you are unsure about whether you are correctly following this rule, please reach out to your account manager for advice.

Aliases:

Authorizations:
API-keyLegacy-API-key
query Parameters
seoId
integer
Example: seoId=14235

unique numeric identifier for the attraction to retrieve details for

currencyCode
string
Example: currencyCode=EUR

currency-code for the currency in which to display pricing details for the desired attraction

header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

object

Response samples

Content type
application/json
{}

/attraction/reviews

This service gets reviews related to an attraction. These reviews might be associated indirectly through the related products.

Note:

  • Pages generated using data from this endpoint are subject to a strict no-index policy. If you are unsure about whether you are correctly following this rule, please reach out to your account manager for advice.

Aliases:

Authorizations:
API-keyLegacy-API-key
query Parameters
seoId
integer
Example: seoId=14235

unique numeric identifier of the attraction for which to retrieve reviews

sortOrder
string
Example: sortOrder=SEO_REVIEW_RATING_D

Sort order for the results; one of:

  • 'SEO_REVIEW_RATING_D' - sort by traveler rating (descending)
  • 'SEO_REVIEW_RATING_PUBLISHED_DATE_D' - sort by date of publication (most recent first)
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T22:37:31+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 97,
  • "errorMessageText": null,
  • "vmid": "331004"
}

/attraction/photos

This service returns photos that are related to an attraction. These may be associated indirectly if they are photos of products related to the attraction.

Note:

  • Pages generated using data from this endpoint are subject to a strict no-index policy. If you are unsure about whether you are correctly following this rule, please reach out to your account manager for advice.

Aliases:

Authorizations:
API-keyLegacy-API-key
query Parameters
topX
string
Example: topX=1-3

start and end rows to return in the format {start}-{end}

  • e.g. '1-10', '11-20'
  • maximum number of rows per request is 100
  • therefore, '100-400' will return the same as '100-200'
  • if topX is not specified, the default is '1-100'
seoId
integer
Example: seoId=14235

unique numeric identifier for the attraction to retrieve photos

header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

Response samples

Content type
application/json
{}

/attraction/products

This service gets attraction-related products (for cross-selling purposes)

Aliases:

Authorizations:
API-keyLegacy-API-key
query Parameters
seoId
integer
Example: seoId=14235

unique numeric identifier for the attraction

topX
string
Example: topX=1-3

start and end rows to return in the format {start}-{end}

  • e.g. '1-10', '11-20'
  • maximum number of rows per request is 100
  • therefore, '100-400' will return the same as '100-200'
  • if topX is not specified, the default is '1-100'
sortOrder
string
Example: sortOrder=SEO_PRODUCT_TOP_SELLERS

Sort order for the results; one of:

  • 'SEO_PRODUCT_TOP_SELLERS' – top sellers (Note: What Viator gets paid impacts this sort order)
  • 'SEO_PRODUCT_REVIEW_AVG_RATING_A' – traveller rating (low->high)
  • 'SEO_PRODUCT_REVIEW_AVG_RATING_D' – traveller rating (high->low)
  • 'SEO_PRODUCT_PRICE_FROM_A' – price (low->high)
  • 'SEO_PRODUCT_PRICE_FROM_D' – price (high->low)
currencyCode
string
Example: currencyCode=EUR

currency-code for the currency in which to display pricing details for the products related to the specified attraction.

Note:

  • You must have multiple currencies enabled in order to set the currency using this parameter. Please speak to your account manager if you wish to have this enabled.
  • If you omit this parameter; or, if you do not have multiple currencies enabled, pricing will be returned in the default currency for your account.
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

Array of objects

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": [
    ],
  • "dateStamp": "2020-04-20T22:33:42+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331002"
}

Support services

Support services

/support/customercare

This endpoint returns the URL to the Viator help page.

Authorizations:
API-keyLegacy-API-key
header Parameters
Accept-Language
required
string

Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available language codes)

Responses

Response Schema: application/json
errorReference
string

reference number of this error

dateStamp
string

timestamp of this response

errorType
string

code specifying the type of error

errorCodes
Array of strings

array of error codes pertaining to this error

errorMessage
Array of arrays

array of error message strings

errorName
string

name of this type of error

extraInfo
object

ignore (Viator only)

extraObject
object

ignore (Viator only)

success
boolean

boolean indicator of this request's outcome

  • true: the request was successful with no errors
  • false: an error was encountered
totalCount
integer

number of results available for this service

errorMessageText
string

array of error message strings in plain text

vmid
string

unique numeric id of the server that processed this request

object

Response samples

Content type
application/json
{
  • "errorReference": null,
  • "data": {
    },
  • "dateStamp": "2020-04-21T17:05:27+0000",
  • "errorType": null,
  • "errorCodes": [ ],
  • "errorMessage": null,
  • "errorName": null,
  • "extraInfo": { },
  • "extraObject": null,
  • "success": true,
  • "totalCount": 1,
  • "errorMessageText": null,
  • "vmid": "331002"
}