EV Charging Stations Availability
Purpose
The EV Charging Stations Availability endpoint provides information about the current availability of charging points, grouped by connector type and then power level. The response can be filtered by connector type and a range of charging powers, if provided (using optional request parameters).
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.
Request format
https://{baseURL}/search/{versionNumber}/chargingAvailability.{ext}?key={Your_API_Key}&chargingAvailability={chargingAvailabilityId}&connectorSet={connectorSet}&minPowerKW={minPowerKW}&maxPowerKW={maxPowerKW}
URL example
https://api.tomtom.com/search/2/chargingAvailability.json?key={Your_API_Key}&chargingAvailability=00112233-4455-6677-8899-aabbccddeeff&connectorSet=IEC62196Type2CableAttached&minPowerKW=22.2&maxPowerKW=43.2
curl command example
curl 'https://api.tomtom.com/search/2/chargingAvailability.json?key={Your_API_Key}&chargingAvailability=00112233-4455-6677-8899-aabbccddeeff&connectorSet=IEC62196Type2CableAttached&minPowerKW=22.2&maxPowerKW=43.2'
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 chargingAvailability ID, previously retrieved from the
|
Optional parameters | Description |
---|---|
string | A comma-separated list of connector types which could be used to
restrict the result to the availability for the specific connector
types. See the list of
Supported Connector Types. Examples:
|
double | An optional parameter which could be used to restrict the result to the
availability for connectors with a specific minimal value of power in
kilowatts (closed interval - with that value). Example:
This parameter might be used together with |
double | An optional parameter which could be used to restrict the result to the availability for connectors with a specific maximum value of power in kilowatts (closed interval - with that value). Value: A double value representing the power rate in kilowatts. Example:
This parameter might be used together with |
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 "connectors": [3 {4 "type": "IEC62196Type2Outlet",5 "total": 2,6 "availability": {7 "current": {8 "available": 1,9 "occupied": 1,10 "reserved": 0,11 "unknown": 0,12 "outOfService": 013 },14 "perPowerLevel": [15 {16 "powerKW": 22.2,17 "available": 1,18 "occupied": 0,19 "reserved": 0,20 "unknown": 0,21 "outOfService": 022 },23 {24 "powerKW": 50.0,25 "available": 0,26 "occupied": 1,27 "reserved": 0,28 "unknown": 0,29 "outOfService": 030 }31 ]32 }33 }34 ],35 "chargingAvailability": "75502858-a491-36fe-7128-23d400153b86"36}
If the <ext>
parameter value is set to .xml
, the response will be an XML format with the following structure:
1<?xml version="1.0" encoding="UTF-8"?>2<response>3 <chargingAvailability>75502858-a491-36fe-7128-23d400153b86</chargingAvailability>4 <connectors>5 <item>6 <type>IEC62196Type2Outlet</type>7 <total>2</total>8 <availability>9 <current>10 <available>1</available>11 <occupied>1</occupied>12 <reserved>0</reserved>13 <unknown>0</unknown>14 <outOfService>0</outOfService>15 </current>16 <perPowerLevel>17 <power>18 <powerKW>22.2</powerKW>19 <available>1</available>20 <occupied>0</occupied>21 <reserved>0</reserved>22 <unknown>0</unknown>23 <outOfService>0</outOfService>24 </power>25 </perPowerLevel>26 <perPowerLevel>27 <power>28 <powerKW>50.0</powerKW>29 <available>0</available>30 <occupied>1</occupied>31 <reserved>0</reserved>32 <unknown>0</unknown>33 <outOfService>0</outOfService>34 </power>35 </perPowerLevel>36 </availability>37 </item>38 </connectors>39</response>
Usage and freshness of EV Charging Stations 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 | The charging connector data. array of item objects |
item object | |
Field | Description |
string | The charging connector type. See the list of Supported Connector Types. |
integer | The total number of charging points of the |
object | The availability data. array of item objects |
item object | |
Field | Description |
object | Contains the current availability data. current object |
object | Contains connector availability per power level. array of perPowerLevel objects |
current object | |
Field | Description |
integer | The number of charging points that are available. |
integer | The number of charging points that are occupied. |
integer | The number of charging points that are reserved. |
integer | The number of charging points whose availability data is not known. |
integer | The number of charging points that are out of service. |
perPowerLevel object | |
Field | Description |
double | Power value in kW. |
integer | The number of charging points that are available with this power. |
integer | The number of charging points that are occupied with this power. |
integer | The number of charging points that are reserved with this power. |
integer | The number of charging points whose availability data is not known with this power. |
integer | The number of charging points that are out of service with this power. |
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 EV Charging Stations Availability service clients.
Header | Description |
---|---|
The Charging Availability service allows cross-origin resource sharing. Value: | |
The Charging 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. |