A basic response uses the below layout. On a successful search, all relevant response data is returned as part of the success object, with additional warnings if recommended fields are not provided. On a failed search, all relevant error details are provided in the 'errors' array, with an explanation of what must be passed to make the request succeed. Below is a detailed explanation for each property of the response. For complete examples refer to the Examples section of the documentation.
{ "success": {}, "errors": [], "warnings": [], "completedAt": "2017-12-20T20:23:09.719Z" }
|
Parameter |
Type |
Description |
|
requestId |
string |
A unique ID associated with the request. This will be regenerated for every new request and reuse for the following polling requests. |
|
results |
array |
An array of hotels (see below). |
|
isComplete |
boolean |
Indicates if the response is complete or if polling is required. |
|
pricingType |
string |
Indicates whether the displayed price is nightly, total, or includes fees, taxes, etc. (e.g., base, base_plus_fees, all_inclusive, all_inclusive_with_exclusions, all_inclusive_total). |
|
pollingLink |
string |
Url to make a polling request for the same search data. This allows us to serve the same request with additional pricing information. This link is only returned when the response is incomplete. To improve hotel pricing load speed we recommend showing prices on each poll vs waiting for all prices, e.g. isCompete flag above. Each poll should complete within 1 second, and each is considered a separate request. |
{ "requestId": "7da60f11-f45b-4059-bf04-4d6404f90985", "results": [ ... ], // hotels "isComplete": false,
"pricingType": "base_plus_fees", "pollingLink": "https://api.tripadvisor.com/api/partner/3.0/synmeta-pricing?..." }
|
Parameter |
Type |
Description |
|
hotelId |
string |
A unique ID associated with the hotel. |
|
strikeThroughDisplayPrice |
string |
The strike through pricing for the hotel. |
|
availability |
string |
The availability of the hotel. Possible values are 'pending', 'available', 'unavailable', 'unknown'. |
|
offers |
array |
An array of offers for the given hotel (see below). The size of the array should be 1. |
{ "hotelId": "94344", "strikeThroughDisplayPrice": "$539", "availability": "available", "offers": [ ... ] // offers }
|
Parameter |
Type |
Description |
|
availability |
string |
The availability of the offer. Possible values are 'pending', 'available', 'unavailable', 'unknown'. |
|
displayName |
string |
The display name for the offer provider, eg. Tripadvisor. |
|
displayPrice |
string |
The price to show to the user with a currency symbol. |
|
price |
number |
The price to show to the user represented as a number. |
|
logo |
string |
The URL of the Tripadvisor logo. |
|
clickUrl |
string |
The URL to the Tripadvisor /HotelHighlight page with offers. |
|
freeCancellationDate |
string |
Where applicable, this returns the date up to which the hotel can be canceled for free. |
|
timeOfPayment |
string |
Whether the payment is required at booking or at stay. Possible values are 'TIME_OF_BOOKING' and 'TIME_OF_STAY'. |
{
"availability": "available",
"displayName": "Tripadvisor",
"displayPrice": "$155",
"price": 155,
"logo": "https://static.tacdn.com/img2/brand_refresh/Tripadvisor_logoset_solid_green.svg",
"clickUrl": "https://www.tripadvisor.com/Hotel_Review-s1-...",
"freeCancellationDate": "2025-04-24",
"timeOfPayment": "TIME_OF_BOOKING" }
|
Parameter |
Type |
Description |
|
errors |
array |
|
|
code |
number |
Error code. |
|
message |
string |
Error message. |
|
payload |
object |
Additional error metadata. |
{
"success": null,
"errors": [
{ "code": 400, "messageKey": "Missing hotel/location id", "message": "Hotel or location id is required.",
"playload": {}
}
],
"warnings": [],
"completeAt: "2021-05-03T21:58:07.679Z" }
{
"success": null,
"errors": [
{
"code": 400,
"messageKey": "Invalid check out date",
"message": "Invalid check out date, should not be empty!",
"payload": {}
}
],
"warnings": [],
"completedAt":"2021-05-03T21:56:08.547Z"
}
{
"error":
{
"code" : "160",
"type" : "UnauthorizedException",
"message" : "client key not set"
}
}