Parking Availability
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.
Purpose
The Parking Availability service provides information about the current availability status of parking sites.
Request data
HTTPS method: GET
For ease of viewing and identification:
- 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 their values. The generic request format is as follows.
URL format
https://{baseURL}/search/{versionNumber}/parkingAvailability.{ext}?key={Your_API_Key}&parkingAvailability={parkingAvailabilityId}
URL example
https://api.tomtom.com/search/2/parkingAvailability.json?key={Your_API_Key}&parkingAvailability=00000000-0003-1d9a-0009-20d4467654e2
curl command example
curl 'https://api.tomtom.com/search/2/parkingAvailability.json?key={Your_API_Key}&parkingAvailability=00000000-0003-1d9a-0009-20d4467654e2'
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 | The base URL for calling the API. Value: |
string | The service version. Value: The current value is |
string | The response format of the API request. The valid response format is JSON or XML. Value: |
string | An API Key valid for the requested service. Value: Your valid |
string | The |
Request headers
The following table describes HTTP request headers.
Optional headers | Description |
---|---|
Tracking-ID | Specifies an identifier for the request.
Value: An |
Response data
Response body
If the <ext>
parameter value is set to .json
, the response will be a JSON object with the following structure:
1{2 "statuses": [3 {4 "current": {5 "emptySpots": 1,6 "updatedAt": "2021-12-12T11:29:00Z",7 "available": true,8 "availabilityTrend": "emptying"9 }10 }11 ],12 "parkingAvailability": "00000000-0003-1d9a-0009-20d4467654e2"13}
If the <ext>
parameter value is set to .xml
, the response will be an XML format with the following structure:
1<response>2 <parkingAvailability>00000000-0003-1d9a-0009-20d4467654e2</parkingAvailability>3 <statuses>4 <item>5 <current>6 <emptySpots>1</emptySpots>7 <updatedAt>2021-12-12T11:29:00Z</updatedAt>8 <available>true</available>9 <availabilityTrend>emptying</availabilityTrend>10 </current>11 </item>12 </statuses>13</response>
Usage and freshness of Parking Availability data
Updates are provided regularly, typically within minutes.
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 |
string | The ID of the returned entity. |
array | A list of parking availability statuses present in this parking site. array of item objects |
item object | |
Field | Description |
object | Current state for this Status. current object |
current object | |
Field | Description |
boolean | Parking availability status. |
integer | Number of available parking spots. |
string | Prediction on availability. Available values:
|
string | The time at which this parking spot data was last updated. Format: YYYY-MM-DDThh:mm:ssZ ISO_8601 |
Response codes
Code | Meaning & possible causes |
---|---|
| OK : If the given Error response example - JSON
|
| Bad request : One or more parameters (e.g.,
|
| Forbidden : Possible causes include:
|
| Not Found : The requested resource could not be found, but it may be available again in the future. |
| Method Not Allowed : The client used an HTTP method other than
|
| Too Many Requests : The API Key is over QPS (Queries per second). |
| Server Error : The service was unable to process your request. Contact support to resolve the issue. |
Response headers
The following table lists HTTP response headers of particular interest to Parking Availability service clients.
Header | Description |
---|---|
The Parking Availability service allows cross-origin resource sharing. Value: | |
The Parking Availability service supports HTTP compression if requested by the client. Value: | |
The Cache-Control general-header field is used to specify directives that must be obeyed by all caching mechanisms along the request/response chain.
Value: | |
Indicates the format of the response as chosen by the client. Format:
Value: | |
Tracking-ID | An identifier for the request. If the Tracking-ID header was specified, it is replicated in the response. Otherwise, it is generated automatically by the service. It is only meant to be used for support and does not involve tracking of you or your users in any form. Value: An |
Error response
The error response content type depends on the ext
parameter.
1{2 "message": "Missing parameter 'parameterName'",3 "detailedError": {4 "code": "MissingParameter",5 "message": "Missing required parameter 'parameterName'."6 },7 "httpStatusCode": "400"8}
1<ErrorEvResponse>2 <message>Missing parameter 'parameterName'</message>3 <detailedError>4 <code>MissingParameter</code>5 <message>Missing required parameter 'parameterName'.</message>6 </detailedError>7</ErrorEvResponse>
Error response fields
Primary fields | Description |
---|---|
string | A human-readable description of the error. |
object | Detailed information about the error. detailedError object |
detailedError object | |
Field | Description |
string | One of a server-defined set of error codes. |
string | A human-readable description of the error code. It is intended as an aid to developers and is not suitable for exposure to end users. |