POI Categories
Service version: 2
Last edit: 2019.04.04
On this page
Purpose
The POI Categories service endpoint provides a full list of POI categories and subcategories together with their translations and synonyms.
Run this endpoint
You can easily run this and other endpoints.
- Go to the TomTom API Explorer page.
- Click an endpoint.
- Click Try it out.
- Enter/select all required parameter values and any optional parameter values.
- At the bottom of the form, click Execute.
- Review the Response.
Request data
HTTPS Method: GET
URL format
https://<baseURL>/search/<versionNumber>/poiCategories.<ext>?key=<Your_API_Key>&[language=<one_of_the_supported_languages>]
curl command format
curl 'https://<baseURL>/search/<versionNumber>/poiCategories.<ext>?key=<Your_API_Key>&[language=<one_of_the_supported_languages>]'
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.
- Optional parameters, which are highlighted with [square brackets], may be used.
- If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.
Required parameters | |
---|---|
Parameter | Description |
baseURL string |
Base URL for calling the API. Value: api.tomtom.com |
versionNumber string |
Service version. Value: The current value is 2 . |
poiCategories string |
Endpoint name. Value: poiCategories |
ext string |
A valid Response format. Values: json , jsonp , js , or xml |
key string |
An API Key valid for the requested service. Value: Your valid API Key . |
Optional headers | |
Header | Description |
[Accept-Encoding] string |
Enables response compression. Value: gzip |
Optional parameters | |
[language] string |
Language in which the category tree should be returned.
|
Response data
Response body
For illustrative purposes the example below is neatly indented and includes all possible Response fields.
- Actual responses are more compact and the fields present will vary based on the result type and the data available.
- See the following Response fields section for more information.
When requesting JSON (json) output format in the Request URL (ext
parameter), the Response has the following structure:
{
"poiCategories": [
{
"id": 7320,
"name": "Sports Center",
"childCategoryIds": [
7320002,
7320003,
7320004,
7320006,
7320005
],
"synonyms": [
"Fitness Center",
"Fitness Centre",
"Fitness Club",
"Gym",
"Gymnasium",
"Health Club",
"Indoor Sports",
"Indoors Sports",
"Sports Centre",
"Wellness Club"
]
},
{
"id": 7374,
"name": "Stadium",
"childCategoryIds": [
7374002,
7374009,
7374012,
7374003,
7374010,
7374005,
7374008,
7374011,
7374006,
7374014,
7374013,
7374007,
7374004
],
"synonyms": [
"Arena",
"Gymnasium",
"Indoor Arena",
"Sports Field",
"Sports Ground",
"Sports Stadium",
"Sportsfield",
"Sportsground",
"Velodrome"
]
},
. . .
]
}
When requesting XML (xml) output format in the Request URL (ext
parameter), the Response has the following structure:
<?xml version='1.0' encoding='UTF-8'?>
<response>
<poiCategories>
<poiCategory>
<id>7320</id>
<name>Sports Center</name>
<childCategoryIds>
<childCategoryId>7320002</childCategoryId>
<childCategoryId>7320003</childCategoryId>
<childCategoryId>7320005</childCategoryId>
</childCategoryIds>
<synonyms>
<synonym>Gym</synonym>
<synonym>Health Club</synonym>
<synonym>Indoors Sports</synonym>
<synonym>Sports Centre</synonym>
<synonym>Wellness Club</synonym>
</synonyms>
</poiCategory>
<poiCategory>
<id>7374</id>
<name>Stadium</name>
<childCategoryIds>
<childCategoryId>7374002</childCategoryId>
<childCategoryId>7374009</childCategoryId>
<childCategoryId>7374012</childCategoryId>
<childCategoryId>7374003</childCategoryId>
<childCategoryId>7374010</childCategoryId>
<childCategoryId>7374005</childCategoryId>
<childCategoryId>7374008</childCategoryId>
<childCategoryId>7374011</childCategoryId>
<childCategoryId>7374006</childCategoryId>
<childCategoryId>7374014</childCategoryId>
<childCategoryId>7374013</childCategoryId>
<childCategoryId>7374007</childCategoryId>
<childCategoryId>7374004</childCategoryId>
</childCategoryIds>
<synonyms>
<synonym>Arena</synonym>
<synonym>Gymnasium</synonym>
<synonym>Indoor Arena</synonym>
<synonym>Sports Field</synonym>
<synonym>Sports Ground</synonym>
<synonym>Sports Stadium</synonym>
<synonym>Sportsfield</synonym>
<synonym>Sportsground</synonym>
<synonym>Velodrome</synonym>
</synonyms>
</poiCategory>
...
</poiCategories>
</response>
Response fields
The following table describes all of the fields that can appear in a Response. Fields are listed by the Response section they belong to and in the order that they appear in the Response.
poiCategories[ ] array | |
---|---|
Field | Description |
poiCategory object |
Category Tree result list. |
poiCategory{ } object | |
Field | Description |
id long |
Unique ID for the category. |
name string |
Name of the category. |
childCategoryIds array |
List of subcategories ids. |
synonyms array |
List of alternative names of the category. |
HTTP Response codes
The following table contains Response codes signifying successful and failed Requests to an API server.
Code | Meaning & possible causes |
---|---|
200 |
OK: The search successfully returned a result. |
400 |
Bad Request: One or more parameters were incorrectly specified. |
403 |
Forbidden: Possible causes include,
|
405 |
Method Not Allowed: The HTTP Request method (GET) is not supported for this Request. |
404/596 |
Not Found: The HTTP Request method (GET) or path is incorrect. |
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
The following table contains Response headers sent back from an API server.
Header | Description |
---|---|
Access-Control-Allow-Origin |
Ensures that clients implementing the CORS security model are able to access the Response from this service. Value: An asterisk "*" that signifies access to the TomTom API using the Access-Control-Allow-Origin (ACAO) header in its Response indicating which origin sites are allowed. |
Content-Type |
Indicates the format of the Response, as chosen by the client. Format: type/subtype; charset=utf-8 Value: type/subtype is one of:
|
Content-Encoding |
If requested by the client, the Search service applies gzip compression to the Responses with the Accept-Encoding header. Value: gzip |