Parking Locations
Important note
This API is unavailable on a Freemium or Pay As You Grow (PAYG) basis.
Click the Request Access button above to contact our Sales team.
Important notes:
- This TomTom Orbis API is in public preview.
- This API is powered by the TomTom Orbis Maps.
- See the TomTom Orbis Maps documentation for more information.
Purpose
The On-Street Parking API Parking Locations endpoint provides information about on-street parking location probability in the requested point and within the area described by the given radius. Additionally, it can provide parking location ID's and aggregated probability calculated upon the requested area.
Request data
HTTPS Method: GET
- Constants and parameters enclosed in curly brackets
{}
must be replaced with their values. - See the following Request parameters section with the required and optional parameters tables for these values.
URL format
https://{baseURL}/maps/orbis/on-street-parking/locations?apiVersion=1&key={Your_API_Key}&point={latitude},{longitude}&radius={radius}&targetTime={timestamp}&fields={fields}&maxLocations={maxLocations}&selectionType={selectionType}
URL example
https://api.tomtom.com/maps/orbis/on-street-parking/locations?apiVersion=1&key={Your_API_Key}&point=-33.872809993512945,151.20807219091648&radius=100&targetTime=2022-01-01T00:00:01Z&fields=probability&maxLocations=150&selectionType=probability
curl command example
curl 'https//api.tomtom.com/maps/orbis/on-street-parking/locations?apiVersion=1&key={Your_API_Key}&point=-33.872809993512945,151.20807219091648&radius=100&targetTime=2022-01-01T00:00:01Z&fields=probability&maxLocations=150&selectionType=probability'
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.
- Parameters and values are case-sensitive.
- Optional parameters may be used.
Required parameters | Description |
---|---|
string | Base URL for calling the API. Value: api.tomtom.com |
string | The authorization key for access to the API. Value: Your valid |
float,float | The coordinates of the point close to which on-street parking locations are searched for. They must be comma-separated and calculated using EPSG:4326 projection (also known as WGS84 ). Value: latitude,longitude |
Optional parameters | Description |
---|---|
| A version of the API to call. If the parameter is set, it will overwrite the value stored in TomTom-Api-Version header.
Value: The current version is |
positive integer | Maximum radius in a straight line from a point to a parking location, measured in meters. Default value: Values: |
string | The time value used to determine the parking data.
Default value: current timestamp Values: timestamp in the format of
|
string | This parameter allows the customization of response content by choosing which fields (data in the response) are displayed. The names of the fields must be specified as a comma-separated list. Default value: Values:
|
integer | The maximum number of parking locations that are returned. Default value: Values: |
string | The method of selecting the returned locations. Default value: Values:
|
Request headers
The following data table lists HTTP request headers of particular interest to clients of the Parking locations endpoint.
Note: There are no required headers in this endpoint.
Optional headers | Description |
---|---|
TomTom-Api-Version integer | Contains a version of the API to call.
Value: The current version is |
Contains the content encoding (usually a compression algorithm), that the client is able to understand. Value: | |
Tracking-ID | Specifies an identifier for the request. It can be used to trace a call.
The value must match the regular expression
Value: |
Response data
Successful response
- For a single valid request, the Parking Locations endpoint returns its response body in JSON format.
- The fields that appear in a response depend on a value of the
{fields}
request parameter. - By default, the client only gets the
probability
andcoordinates
data.
Response schema
The exclamation mark !
means that a particular field cannot be equal to null
, for example:
Point!
- value cannot be equal to null[Point!]
- array of non-null objects[Point]!
- array cannot be null, but it can contain null values
1type Query {2 easeOfParking: Float3 locations: [Location]4}
1type Coordinates {2 longitude: Float3 latitude: Float4}
1type Location {2 probability: Float3 parkAndRide: Boolean4 id: String5 coordinates: [Coordinates]6}
Response field structure
The following table describes JSON element fields that can appear in a response.
Field | Description |
---|---|
array | It contains available parking locations. If there is no data in the requested area the array is empty. |
array | It contains geometry of a particular on-street parking location in the form of a linestring - longitudes and latitudes in a EPSG:4326 projection ( WGS84 ). |
float | It is a probability of finding an available on-street parking location belonging to the given coordinates. If probability equals Values: |
float | It is an aggregated probability of finding an available parking location, calculated upon all of the locations available in the requested area. If easeOfParking equals
Values: |
string | This is the parking location ID, coming directly from our parking data provider. It can be used to combine data from different sources. Value: A parking location ID. |
boolean | Indicates if it is a parking location with public transport connections that allows people to leave their vehicles and transfer to a means of public transport for the remainder of the journey. Value: |
Response examples
Example 1 - request & response
maps/orbis/on-street-parking/locations?apiVersion=1&point=-33.872809993512945,151.20807219091648
1{2 "locations":[3 {4 "probability":0.37,5 "coordinates":[6 {7 "longitude":151.2080673806,8 "latitude":-33.87245525739 },10 {11 "longitude":151.2080566518,12 "latitude":-33.872607805713 }]14 },15 {16 "probability":null,17 "coordinates":[18 {19 "longitude":151.2080566518,20 "latitude":-33.872685958821 },22 {23 "longitude":151.2080539696,24 "latitude":-33.872838506725 }]26 }27 ...]28}
Example 2 - request & response
https://api.tomtom.com/maps/orbis/on-street-parking/locations?apiVersion=1&point=-33.872809993512945,151.20807219091648&fields=easeOfParking
1{2 "easeOfParking": 0.463}
Example 3 - request & response
https://api.tomtom.com/maps/orbis/on-street-parking/locations?apiVersion=1&point=-33.872809993512945,151.20807219091648&fields=coordinates,probability,easeOfParking,id
1{2 "easeOfParking":0.37,3 "locations":[4 {5 "id":"00000000-000c-719d-0009-20d4467654e2",6 "probability":0.37,7 "coordinates":[8 {9 "longitude":151.2080673806,10 "latitude":-33.872455257311 },12 {13 "longitude":151.2080566518,14 "latitude":-33.872607805715 }]16 },17 {18 "id":"00000000-000c-719d-0009-20d4467654e2",19 "probability":null,20 "coordinates":[21 {22 "longitude":151.2080566518,23 "latitude":-33.872685958824 },25 {26 "longitude":151.2080539696,27 "latitude":-33.872838506728 }]29 }30 ...]31}
Error response
The Parking Locations endpoint, for an invalid single request, returns a response body in JSON format.
Response field structure
Field | Description |
---|---|
object | Main |
string | One of a server-defined set of error codes. |
string | A human-readable description of the error code. |
Response example
1{2 "detailedError": {3 "code": "INVALID_REQUEST",4 "message": "Missing required parameter: point."5 }6}
HTTP response codes
Code | Meaning & possible causes |
---|---|
| OK |
| Bad request |
| Forbidden: The supplied API Key is not valid for this request. |
| Method Not Allowed: The provided HTTP request method is known by the server, but is not supported by the target resource. |
| Too Many requests: Too many requests were sent in a given amount of time for the supplied API Key. |
| Internal Server Error |
| Service currently unavailable: The service is currently unavailable. |
| Service Not Found: Unknown version of the service. |
HTTP response headers
The following data table contains response headers sent back from an API server.
Header | Description |
---|---|
Indicates that cross-origin resource sharing (CORS) is allowed. Value: | |
Lists the set of supported HTTP methods. The header is sent in case a
Value: | |
Indicates which encodings were applied to the response body. Value: | |
Contains information about the size of the response body. Value: | |
Indicates the media type of the resource returned. Value:
| |
Contains the date and time at which the message was originated. For
details check
RFC 7231. | |
Tracking-ID | An identifier for the request. If the Tracking-ID header was specified in the request, it is replicated in the response. Otherwise, it is generated automatically by the service. For details check RFC 4122. It is only meant to be used for support and does not involve tracking of you or your users in any form. Value: <string> |