Points of Interest Photos
Service version: 2
Last edit: 2020.05.19
On this page
Purpose
The Points of Interest (POI) Photos service provides photos of the POI.
Request data
HTTPS methods: GETHEAD
URL format
For ease of viewing and identification:
- Constants and parameters enclosed in angle brackets (< >) must be replaced with their values.
- See the following Request parameters section with the Required and Optional parameters tables for these values.
https://<baseURL>/search/<versionNumber>/poiPhoto?key=<Your_API_Key>&id=<id>&height=<height>&width=<width>
curl command format
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 | |
---|---|
Parameter | Description |
baseURL string |
The base URL for calling the API. Value: api.tomtom.com |
versionNumber string |
The service version. Value: The current value is 2 .
|
key string |
An API Key valid for the requested service. Value: Your valid API Key .
|
id string |
Photo id which is previously retrieved from the Points of Interest Details details service. Example: f32882c6-825b-3429-8445-f6a72bbcf3ac
|
Optional parameters | |
Parameter | Description |
width integer |
The maximum height/width of the image.
|
height integer |
HTTP Request headers
The following table describes HTTP Request headers.
Optional headers | |
---|---|
Header | Description |
If-None-Match string |
Specifies a previously fetched Etag value for a refresh Request. Value: Etag value returned with the previous Request.
|
Tracking-ID string |
Specifies an identifier for the Request.
An identifier for the Request.
|
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:
- You shall attribute all Results delivered by the Extended Search-Points of Interest Details API and Points of Interest Photos API as being ‘powered by Foursquare’.
- You shall not use any Results delivered by the Extended Search-Points of Interest Details API and Points of Interest Photos API to create, improve, or edit a venue or point of interest database.
- You shall not cache any Results delivered by the Extended Search-Points of Interest Details API and Points of Interest Photos API for more than 30 days.
- See the Terms and Conditions for more details.
HTTP Response codes
Code | Meaning and Possible Causes |
---|---|
200 |
OK: If the requested photo was provided successfully. |
400 |
Bad request: one or more parameters were incorrectly specified or are out of range. |
403 |
Forbidden: Possible causes include:
|
404 |
Not Found: The requested resource could not be found, but it may be available again in the future. |
405 |
Method Not Allowed. |
429 |
Too Many Requests: The API Key is over QPS (Queries per second). |
5xx |
Server Error: The service was unable to process your Request. Contact support to resolve the issue. |
Response headers
Header | Description |
---|---|
Access-Control-Allow-Origin |
Ensures that clients implementing the CORS security model are able to access the Response from this
service. Value: * This asterisk signifies access to the TomTom API using the
Access-Control-Allow-Origin (ACAO) header in its Response, indicating which origin sites are allowed.
|
Cache-Control |
The Cache-Control general-header field is used to specify directives that must be obeyed by all caching mechanisms along the request/response chain. Supported by HTTP/1.1 clients. May not be supported by HTTP/1.0 clients. Value: public, max-age=2592000, immutable |
Expires |
Expiration date information which is set to 30 days later. Cache-Control header takes precedence. Example value: Fri, 04 Sep 2020 21:30:03 GMT |
Content-Type |
Indicates the format of the Response. Format: image/subtype Value: type/subtype:
|
Content-Length |
Optional content length information (in number of bytes). |
Tracking-ID |
An identifier for the Request.
An identifier for the Request.
|
Etag |
Etag value of the photo. |
Error Response
The error Response content type depends on the ext
parameter.
Error Response example (JSON)
{
"message":"Missing parameter 'parameterName'",
"detailedError":{
"code":"MissingParameter",
"message":"Missing required parameter 'parameterName'.",
},
"httpStatusCode":"400"
}
Error Response example (XML)
<ErrorEvResponse>
<message>Missing parameter 'parameterName'</message>
<detailedError>
<code>MissingParameter</code>
<message>Missing required parameter 'parameterName'.</message>
</detailedError>
</ErrorEvResponse>
Error Response fields
Primary fields | |
---|---|
Field | Description |
message string |
A human-readable description of the error. |
detailedError object |
Detailed information about the error.detailedError{} object
|
detailedError{} object |
|
Field | Description |
code string |
One of a server-defined set of error codes. |
message string |
A human-readable description of the error code. It is intended as an aid to developers and is not suitable for exposure to end users. |