Sorry, you need to enable JavaScript to visit this website.

Locations


Service version: 1.0
Last edit: 2020.06.23

On this page

Purpose

The Locations endpoint provides access to locations created by users from your organization.

▲ Return to top

Request data

HTTPS Method: GET

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, which are highlighted with [square brackets], may be used.
Required parameters
Parameter Description
baseURL
string
Base URL for calling the API.
Value: enterprise-api.rer.tomtom.com
versionNumber
string
Service version.
Value: The current value is v1.
key
string
An API Key valid for the requested service.
Value: Your valid API Key.
page
integer
The page number.
Value: An integer
size
integer
Gets the number of items that should be returned in one call.
Value: An integer.
Optional parameters
[country]
string
The ISO Country code.
Value: A string.
[createdBy]
string
Email of the event reporter
Value: A string.
[sort]
array[string]
The sort facility.
Value: lastModifiedAt;desc or lastModifiedAt;asc

Request Headers

Header Description
[Accept-Encoding]
string
Optional. Enables response compression.
Value: gzip

▲ Return to top

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:
{
  "entities": [
    {
      "locationId": 0,
      "locationName": "string",
      "locationEffect": "string",
      "isBidirectional": true,
      "startDateTime": "2020-06-03T15:59:26.862Z",
      "startDateTimeZoned": "2020-06-03T15:59:26.863Z",
      "endDateTime": "2020-06-03T15:59:26.863Z",
      "endDateTimeZoned": "2020-06-03T15:59:26.863Z",
      "createdAt": "2020-06-03T15:59:26.863Z",
      "createdBy": "string",
      "geometry": "string",
      "liveStatusAB": "string",
      "liveStatusBA": "string",
      "eventId": 0,
      "eventName": "string",
      "eventType": "string",
      "eventTimeZone": "string",
      "eventSource": "string",
      "eventNotes": "string",
      "eventTags": "string",
      "eventCause": "string",
      "eventScheduleStartDate": "2020-06-03T15:59:26.863Z",
      "eventScheduleEndDate": "2020-06-03T15:59:26.863Z",
      "eventScheduleRRule": "string"
    }
  ],
  "commonFilters": {
    "additionalProp1": {},
    "additionalProp2": {},
    "additionalProp3": {}
  },
  "domainFilters": {
    "additionalProp1": {},
    "additionalProp2": {},
    "additionalProp3": {}
  }
}

▲ Return to top

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
entitles
object
A list of location items.
entitles
Field Description
commonFilters
object
The list of common filters applied.
domainFilters
object
The list of additional fiters applied.
entities
Field Description
locationId
integer
The location id.
locationName
string
The name of the location.
locationEffect
integer
TMCCode
isBidirectional
integer
True if the location is biderectional.
startDateTime
date
The location start date in UTC format.
startDateTime
date
The location start date in the location timezone.
endDateTime
date
The location end date in the location.
endDateTimeZoned
date
The location end date in the location timezone.
createdAt
date
The location creation date.
createdBy
string
Email of the user who created the location.
geometry
geojson
GeoJSON with geometry.
liveStatusAB
string
Live Traffic status for a positive direction.
liveStatusBA
string
Live Traffic status for a negative direction.
eventId
integer
Id of the event.
eventName
String
The event name.
eventType
String
The event type.
eventTimeZone
String
The timezone name.
eventSource
String
The event source URL.
eventNotes
String
The event public notes.
eventTags
String
The event tags.
eventCause
String
The cause name.
eventScheduleStartDate
String
The schedule start date. The start date of the first scheduled occurrence.
eventScheduleEndDate
String
The schedule end date. The end date of the first scheduled occurrence.
eventScheduleRRule
String
The Schedule RRULE (RFC-5545).

▲ Return to top

HTTP Response Codes

The following table contains 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.)

Successful and failed Response codes

Code Meaning and possible causes
200 OK
206 Partial Content
400 Malformed request: The requested syntax is not available.
400 Bad request: Parameters out of range.
401 Unauthorized:
  • The supplied Admin Key is not valid for this Request.
  • No Admin Key is supplied.
401 Unauthorized: Configuration not found.
  • The configuration does not exist in the database.
  • The user has not registered an Admin Key.
403 Forbidden: The supplied API Key is not valid for this Request.
403 Forbidden: User can only register once.
429 Too Many Requests: The API key is over QPS (Queries per second).
500 Internal Server Error: There is a problem with the TomTom Road Event Reporter Enterprise API service.

▲ Return to top

Response headers

The following table contains Response headers sent back from an API server.

Header Description
Access-Control-Allow-Origin The Access-Control-Allow-Origin response header indicates whether the Response can be shared with the requesting code from the given origin.
Value: *
Connection The Connection general header controls whether or not the network connection stays open after the current transaction finishes.
Value: keep-alive
Content-Encoding The Content-Encoding entity header is used to compress the media-type.
Value: gzip
Content-Length The Content-Length entity header indicates the size of the entity-body in bytes that are sent to the recipient.
Value: Content-Length
Content-Type The Content-Type entity header is used to indicate the media type of the resource.
Value: application/json;charset=UTF-8
Date The Date general header contains the date and time at which the message was originated.
Value: Date
Strict-Transport-Security 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.
Value: max-age=<expire-time>& includeSubDomains
Vary 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.
Value: A comma-separated list of header names.
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.
Value: string

▲ Return to Top