getSingleDataLayerByTileId
Request accessReturns one data layer of one tile. Use it when your map data component needs only some layers of a tile, for example the road layer without lanes.
To find out which layers a tile has and their current versions, call getHeaderOnlyByTileId first.
Request data
HTTP method: POST
https://{serviceURL}/getSingleDataLayerByTileId?apiKey={Your_API_Key}serviceURLis your Smart Layer Tile Service endpoint, without/openapi.json.Your_API_Keyis a My.TomTom API key with NDS.Live services enabled.
Request body
The body is a zserio-encoded DataLayerTileVersionRequest object:
| Field | Description |
|---|---|
id | The packed tile ID. |
layerId | The ID of the data layer you want. |
lifetimeInfo | The lifetime type and version of the layer, as listed in the tile’s current header. The service returns only this version. If it doesn’t have it, for example because the layer was updated since, the service returns 404. |
The layer isn’t always available. It can also refer to other layers, which you request in separate calls.
To request a layer, first read its current version with getHeaderOnlyByTileId. To check for changes, use getDeltaLayerByTileId.
HTTP request headers
| Header | Description |
|---|---|
Content-Type | application/x-zserio-object, the zserio media type. |
Response data
Response body
On success, the body is a zserio-encoded DataLayer object:
| Field | Description |
|---|---|
hasSignature | true if the layer is signed. |
signature | Optional. The layer’s signature, if hasSignature is true. |
layer | The layer data. It starts with a descriptor that names the module, its version and the data type, for example ROAD, 2026.03 and road.layer.RoadLayer. The layer data that follows is packaged as described in the tile’s header. |
The response doesn’t include the tile’s header, so it doesn’t say how the layer data is compressed. Read the layer’s packagingDetails from getHeaderOnlyByTileId. On TomTom’s ADAS Road Model evaluation service, the layers are compressed with zstd.
HTTP response headers
This method doesn’t return an ETag, so it doesn’t support conditional requests. The response has Cache-Control: no-cache, no-store, max-age=0, must-revalidate, so HTTP caches don’t store it.
HTTP status codes
Besides the codes below, any method can return the common errors, for example 401 for a missing API key.
| Code | Meaning |
|---|---|
200 | OK. The response body holds the DataLayer. |
204 | The tile is empty, or outside the area your product covers. Cache the empty result and don’t retry. |
400 | Bad request. The request body can’t be processed. |
404 | Not found. The service returns this code if it doesn’t have the layer ID you requested, if the layer isn’t static, or if the version you sent in lifetimeInfo isn’t the current one. |
410 | Gone. The Smart Layer Tile Service is decommissioned. Ask the NDS.Live Registry for another service. |
415 | Unsupported media type. The request body isn’t zserio-encoded. |
500 | Internal server error. |
Related resources
getHeaderOnlyByTileId- Access and accounts: Your endpoints
getDeltaLayerByTileId- Request and response patterns: Error messages