Points of Interest Photos
Purpose
The Points of Interest (POI) Photos service provides photos of the POI.
Request data
HTTPS methods: GET
HEAD
For ease of viewing and identification:
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.
https://{baseURL}/search/{versionNumber}/poiPhoto?key={Your_API_Key}&id={id}&height={height}&width={width}
curl 'https://{baseURL}/search/{versionNumber}/poiPhoto?key={Your_API_Key}&id={id}&height={height}&width={width}'
Request parameters
The following table describes the parameters that can be used in a request.
- Required parameters must be used or the call will fail.
- Parameters and values are case-sensitive.
Required parameters | Description |
---|---|
| The base URL for calling the API. |
| The service version. |
| An API Key valid for the requested service. |
| Photo id which is previously retrieved from the
Points of Interest Details API
service. |
Optional parameters | Description |
---|---|
| The maximum height/width of the image.
|
Request headers
The following table describes HTTP request headers.
Optional headers | Description |
---|---|
If-None-Match | Specifies a previously fetched Etag value for a refresh request. |
Tracking-ID | Specifies an identifier for the request. It can be used to trace a call.
The value must match the regular expression
|
Response data
Response body
Photo of the POI.
Usage of Points of Interest Photos data
With respect to the Points of Interest Photos API, the following applies:
Rich Content shall not be provided to Enterprise Customers under any circumstances.
Upon expiry or termination of this Agreement (or as it relates to the expiry or termination of a Commercial Agreement): (i) all of Partner’s and Customers rights regarding Rich Content shall extinguish, (ii) all use of Rich Content shall cease, and (iii) all Rich Content shall be returned or destroyed.
Partner shall ensure that Tripadvisor’s logos and ratings bars will be served directly from Tripadvisor URLs, and that it shall not store and/or locally serve Tripadvisor logos. Partner will make all displays of Rich Content on Partner Product non-indexable by search engines, unless otherwise agreed in a Commercial Agreement.
See the Branding guidelines for more details.
Response codes
Code | Meaning & possible causes |
---|---|
| OK: If the requested photo was provided successfully. |
| Bad request : one or more parameters were incorrectly specified or are out of range. |
| Forbidden : possible causes include:
|
| Not Found : The requested resource could not be found, but it may be available again in the future. |
| Method Not Allowed. |
| Too Many Requests : The API Key is over QPS (Queries per second). |
| Server Error : The service was unable to process your request. Contact support to resolve the issue. |
Response headers
Header | Description |
---|---|
Ensures that clients implementing the CORS security model are able to
access the Response from this service. | |
Indicates the format of the response. Format: image/subtype
| |
Optional content length information (in number of bytes). | |
Tracking-ID | An identifier for the request. If the
Tracking-ID header was specified, it
is replicated in the response. Otherwise, it is generated automatically
by the service. It is only meant to be used for support and does not
involve tracking of you or your users in any form. |
Etag value of the photo. |
Error response
The error response content type depends on the ext
parameter.
1{2 "message": "Missing parameter 'parameterName'",3 "detailedError": {4 "code": "MissingParameter",5 "message": "Missing required parameter 'parameterName'."6 },7 "httpStatusCode": "400"8}
1<ErrorEvResponse>2 <message>Missing parameter 'parameterName'</message>3 <detailedError>4 <code>MissingParameter</code>5 <message>Missing required parameter 'parameterName'.</message>6 </detailedError>7</ErrorEvResponse>
Error response fields
Primary fields | |
---|---|
Field | Description |
| A human-readable description of the error. |
| Detailed information about the error. |
detailedError object | |
Field | Description |
| One of a server-defined set of error codes. |
| A human-readable description of the error code. |