Filters
To render stations on a map, you need to add a set of filters to the tile request. These filters are sent as query parameters and must be appended after ?
.
Filters
Below you can find an overview of possible filters you can apply.
Arguments
Deprecated in favor of powers
.
Determines the powers of the stations that will be included in the tiles. This can be all
(powers=all
) for all powers or a list of kWh values for individual powers. For kWh values, you can send a numeric array with the specific powers you would like to return, powers[]=22&powers[]=43&powers[]=50
.
Determines the speed groups of powers that will be included in the tiles. We have grouped all available powers into three speed groups (slow
, fast
or turbo
), you can send an array (powerGroups[]=slow &powerGroups[]=fast &powerGroups[]=turbo
). Note: You can't mix powerGroups with powers=all
. You can mix powerGroups with individual powers powerGroups[]=fast&powers[]=22
(for this specific example we will consider both, stations which are fast
and stations that are 22 kWh).
Determine the connector standards that will be included in the tiles. You can send an array with the connectors[]=CHADEMO&connectors[]=IEC_62196_T2_COMBO
, etc.
An optional list of amenities that should be present near the stations. Possible values: hotel
, shopping
, bathroom
, supermarket
, playground
, pharmacy
, museum
, coffee
, park
, restaurant
.
An optional flag that will return only available (status: free
) stations.
An optional flag that will filter stations by a pre-defined preferred operator.
Count
You can request the number of displayed stations on the map by using the following API endpoint. If you applied any filters you will need to apply them to the count endpoint as well to make sure you receive the correct count.
https://api.chargetrip.io/station/count.json
https://api.chargetrip.io/station/count.json?powers[]=22&powers[]=43&connectors[]=CHADEMO&connectors[]=IEC_62196_T2_COMBO&amenities[]=restaurant&availableOnly=true
It will return a response that looks like this:
{
"count": 158
}