This document provides the OpenAPI specification for a set of three auxilliary endpoints that support the Viator Partner API v1 to v2 Upgrade Guide:
Date | Description |
---|---|
1 Nov 2022 | Removed outdated product page lucid chart |
6 Oct 2022 | Document created |
bandId
and v2's ageBand
gradeCode
and it's corresponding v2 productOption
identifiers for the specified productThe following Postman collection can be used for testing these endpoints:
treatAsAdult
flagIn v1 of this API, the requirement (or lack thereof) for an adult to be included in a booking was communicated via the treatAsAdult
flag in the items of the ageBands[]
array in the response from the /product endpoint. The default assumption in the v1 API was that at least one adult is required per booking unless the treatAsAdult
flag is set to true
for a non-adult age-band, in which case the inclusion of one traveler from that age-band is sufficient to fulfil the requirement.
See: Key concepts – Working with age-bands (Partner API v1) for more information.
In v2 of this API, whether an adult traveler is required in order to make a booking is communicated via the bookingRequirements.requiresAdultForBooking
flag in the response from any of the product content endpoints.
If this flag is true
, at least one traveler from one of the 'ADULT'
, 'SENIOR'
or 'TRAVELER'
age-bands must be included when making the booking.
Ageband ids provided in the V2 response are different to what is used in V1 endpoints. For the step by step upgrade process, partners will have to find out the leagecyAgebandId to check availability and make a booking in V1.
What does it do - Provides the legacy age band mapping to support step by step upgrade path
Accept required | string Example: application/json;version=2.0 Specifies the version of this API to access |
Accept-Language required | string Example: en-US Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available langage codes) |
X-Unique-ID required | string Tracking identifier for this response. Please include the value of this field when making help requests.
|
RateLimit-Limit required | string Total limit of requests for this endpoint for a given window. For informational purposes only. |
RateLimit-Remaining required | string Remaining requests for this endpoint for a given window. For informational purposes only |
RateLimit-Reset required | string The fixed window in time, in seconds, which represents when a limit is fully replenished. For informational purposes only. |
required | Array of objects Age-band designations |
{- "agebands": [
- {
- "ageBand": "CHILD",
- "bandId": 2
}, - {
- "ageBand": "INFANT",
- "bandId": 3
}, - {
- "ageBand": "SENIOR",
- "bandId": 5
}, - {
- "ageBand": "YOUTH",
- "bandId": 4
}, - {
- "ageBand": "ADULT",
- "bandId": 1
}, - {
- "ageBand": "TRAVELER",
- "bandId": 1
}
]
}
V2 has the concept of tags whereas in V1, there are only categories and subcategories. If the partners upgrade to V2 product endpoint, They will need a way to find the categories/subcategories to continue using V1 endpoints
What does it do - Provides all tags to categories mappings
Gets the v1 categoryId
and subcategoryId
for each v2 tag
Accept required | string Example: application/json;version=2.0 Specifies the version of this API to access |
Accept-Language required | string Example: en-US Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available langage codes) |
X-Unique-ID required | string Tracking identifier for this response. Please include the value of this field when making help requests.
|
RateLimit-Limit required | string Total limit of requests for this endpoint for a given window. For informational purposes only. |
RateLimit-Remaining required | string Remaining requests for this endpoint for a given window. For informational purposes only |
RateLimit-Reset required | string The fixed window in time, in seconds, which represents when a limit is fully replenished. For informational purposes only. |
required | Array of objects Mappings from |
{- "categories": [
- {
- "tagId": 12716,
- "categoryId": 8,
- "subcategoryId": 29
}, - {
- "tagId": 21074,
- "categoryId": 50127,
- "subcategoryId": 50128
}
]
}
V2 Product endpoint lists product options without time(TG1, TG2). For the available timing on each tour grade, V2 availability endpoint needs to be called. This could require manual formatting of the tour grade code which could result in error. V1 Booking endpoint requires the supported tour grade code (e.g TG1~9:00).
What does it do - Provides all the tour grade codes supported in V1 for a given product
product-code required | string The unique identifier of the product for which to retrieve tourgrades |
Accept required | string Example: application/json;version=2.0 Specifies the version of this API to access |
Accept-Language required | string Example: en-US Specifies the language into which the natural-language fields in the response from this service will be translated (see Accept-Language header for available langage codes) |
X-Unique-ID required | string Tracking identifier for this response. Please include the value of this field when making help requests.
|
RateLimit-Limit required | string Total limit of requests for this endpoint for a given window. For informational purposes only. |
RateLimit-Remaining required | string Remaining requests for this endpoint for a given window. For informational purposes only |
RateLimit-Reset required | string The fixed window in time, in seconds, which represents when a limit is fully replenished. For informational purposes only. |
required | Array of objects (TourGrade) |
{- "tourGrades": [
- {
- "gradeTitle": "7pm Standard Night Tour 19:00",
- "gradeCode": "TG1~19:00",
- "productOptionCode": "TG1",
- "gradeDescription": "Duration: 3 hours: Please arrive at 6.30pm for processing, as the tour is first come first served.<br/>Panoramic Night Tour: As dusk falls, the city comes to life illuminated by the dazzling neon lights Las Vegas is famous for. ",
- "languageGuides": [
- {
- "type": "GUIDE",
- "language": "en",
- "legacyGuide": "en/SERVICE_GUIDE"
}
]
}, - {
- "gradeTitle": "7.15pm Adult only Night Tour 19:15",
- "gradeCode": "TG2~19:15",
- "productOptionCode": "TG2",
- "gradeDescription": "Duration: 2 hours 15 minutes: Please go to Big Bus Tours staff at the Circa Hotel Concierge desk no later than 7:15 pm. <br/>Welcome Drink Included : Welcome drink on arrival, and then make your way to the Big Bus at Circa's Garage Mahal (5-minute walk), arriving by 19.50pm.<br/>Club One Player's Membership: 10.15pm return, you can then head over to Circa's bar & continue the fun in the casino with your Club One Player's Membership<br/>Age : Please note you must be 21 or over for this tour. ",
- "languageGuides": [
- {
- "type": "GUIDE",
- "language": "en",
- "legacyGuide": "en/SERVICE_GUIDE"
}
]
}
]
}