Locations
Purpose
The Locations endpoint provides access to locations created by users from your organization.
Request data
HTTPS Method: GET
- 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 these values. The generic URL format is as follows.
URL format
https://enterprise-api.rer.tomtom.com/api/v1/locations/?key={Your_API_Key}
curl command format
curl 'https://enterprise-api.rer.tomtom.com/api/v1/locations/?key={Your_API_Key}'
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 may be used.
Required parameters | Description |
---|---|
string | Base URL for calling the API.
|
| Service version.
|
| An API Key valid for the requested service.
|
| The page number.
|
| Gets the number of items that should be returned in one call.
|
Optional parameters | Description |
---|---|
| The ISO Country code.
|
| Email of the event reporter
|
| The sort facility.
|
Request headers
Header | Description |
---|---|
Optional. Enables response compression. Value: |
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 field documentation for more information.
When requesting JSON output, the response has the following structure:
1{2 "entities": [3 {4 "locationId": 0,5 "locationName": "string",6 "locationEffect": "string",7 "isBidirectional": true,8 "startDateTime": "2020-06-03T15:59:26.862Z",9 "startDateTimeZoned": "2020-06-03T15:59:26.863Z",10 "endDateTime": "2020-06-03T15:59:26.863Z",11 "endDateTimeZoned": "2020-06-03T15:59:26.863Z",12 "createdAt": "2020-06-03T15:59:26.863Z",13 "createdBy": "string",14 "geometry": "string",15 "liveStatusAB": "string",16 "liveStatusBA": "string",17 "eventId": 0,18 "eventName": "string",19 "eventType": "string",20 "eventTimeZone": "string",21 "eventSource": "string",22 "eventNotes": "string",23 "eventTags": "string",24 "eventCause": "string",25 "eventScheduleStartDate": "2020-06-03T15:59:26.863Z",26 "eventScheduleEndDate": "2020-06-03T15:59:26.863Z",27 "eventScheduleRRule": "string"28 }29 ],30 "commonFilters": {31 "additionalProp1": {},32 "additionalProp2": {},33 "additionalProp3": {}34 },35 "domainFilters": {36 "additionalProp1": {},37 "additionalProp2": {},38 "additionalProp3": {}39 }40}
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.
Primary fields | |
---|---|
Field | Description |
| A list of location items.
|
| The list of common filters applied. |
| The list of additional fiters applied. |
entities array | |
Field | Description |
| The location id. |
| The name of the location. |
| TMCCode |
| True if the location is biderectional. |
| The location start date in UTC format. |
| The location start date in the location timezone. |
| The location end date in the location. |
| The location end date in the location timezone. |
| The location creation date. |
| Email of the user who created the location. |
| GeoJSON with geometry. |
| Live Traffic status for a positive direction. |
| Live Traffic status for a negative direction. |
| Id of the event. |
| The event name. |
| The event type. |
string | The timezone name. |
string | The event source URL. |
string | The event public notes. |
string | The event tags. |
string | The cause name. |
string | The schedule start date. The start date of the first scheduled occurrence. |
string | The schedule end date. The end date of the first scheduled occurrence. |
string | The Schedule RRULE ( RFC-5545 ). |
Response codes
The following table contains HTTPS response codes signifying successful and failed requests to an API server. (Choose which response codes are used in this endpoint from the following table. Delete the ones not used, and add new ones if needed.)
Code | Meaning & possible causes |
---|---|
| OK |
| Partial Content |
| Malformed request : The requested syntax is not available. |
| Bad request : Parameters out of range. |
| Unauthorized :
|
| Unauthorized : Configuration not found.
|
| Forbidden : The supplied API Key is not valid for this request. |
| Forbidden : User can only register once. |
| Too Many Requests : The API key is over QPS (Queries per second). |
| Internal Server Error : There is a problem with the TomTom Road Event Reporter Enterprise API service. |
Response headers
The following table contains HTTP response headers sent back from an API server.
Header | Description |
---|---|
The Access-Control-Allow-Origin response header indicates whether the
Response can be shared with the requesting code from the given origin.
| |
The Connection general header controls whether or not the network
connection stays open after the current transaction finishes.
| |
The Content-Encoding entity header is used to compress the media-type.
| |
The Content-Length entity header indicates the size of the entity-body
in bytes that are sent to the recipient.
| |
The Content-Type entity header is used to indicate the media type of the
resource.
| |
The Date general header contains the date and time at which the message
was originated.
| |
The HTTP Strict-Transport-Security response header (often abbreviated as
HSTS) lets a web site tell browsers that it should only be accessed
using HTTPS, instead of using HTTP.
| |
The Vary HTTP response header determines how to match future request
headers to decide whether a cached Response can be used rather than
requesting a fresh one from the origin server.
| |
Tracking-ID | An identifier for the request. An unique identifier used by TomTom to
identify and log a specific client request and trace it back for support
purposes. It is only meant to be used for support and does not involve
tracking of you or your users in any form. If the Tracking-ID header was
specified, it is replicated in the response. Otherwise, it is generated
automatically by the service.
|