HTTP request headers

Service version: 1
Last edit: 2025.01.24
TomTom Orbis Maps

Important notes:

Purpose

The following table describes HTTP request headers.
These headers allow fine tuning of the service behavior to the customer needs.

HTTP request headers

Required headers

Required headersDescription
TomTom-Api-Version

The API version of the service to call.
This can be omitted if the version is already provided as a query parameter for the particular service.
If the version is given both as a query parameter and as a header value, the one from the query parameter takes precedence.
Value: 1

TomTom-Api-Key

An API Key valid for the requested service. This can be omitted if the key is already provided as a query parameter for the particular service. If the key is given both as a query parameter and as a header value, the one from the header parameter takes precedence. Using the header over the query parameter is the recommended approach, as it avoids exposing the key in URLs and is generally more secure. Value: Your valid API Key.

Using API Key as a header in MapLibre

  • Constants and parameters enclosed in curly brackets { } must be replaced with their values.
  • For the style URL please see the following Request parameters section with the required and optional parameters tables for their values.
Example
1const map = new maplibregl.Map({
2 container: 'map',
3 style: "https://{baseURL}/maps/orbis/assets/styles/{assetVersion}/style?&apiVersion={API_Version}&map={Map}&hillshade={Hillshade}&trafficFlow={Traffic_Flow}&trafficIncidents={Traffic_Incidents}",
4 transformRequest: (url, resourceType) => {
5 return {
6 url: url,
7 headers: { 'TomTom-Api-Key': '{API_Key}'},
8 }
9 }
10});

Optional Headers

Optional headersDescription
Accept-Encoding

Contains the content encoding (usually a compression algorithm), that the client is able to understand.
Value: gzip

If-None-Match

It is used to specify conditions for a resource to be fetched, allowing the server to skip sending the resource if the client already has an up-to-date version, and identified by values provided in the Etag header.
Value: string

Tracking-ID

Specifies an identifier for the request.

  • It can be used to trace a call.
  • The value must match the regular expression '^[a-zA-Z0-9-]{1,100}$'.
  • An example of the format that matches this regular expression is a UUID (e.g., 9ac68072-c7a4-11e8-a8d5-f2801f1b9fd1 ). For details check RFC 4122.
  • If specified, it is replicated in the Tracking-ID response header.
  • It is only meant to be used for support and does not involve tracking of you or your users in any form.

Value: string