EV POI details
Get detailed information about Electric Vehicle (EV) charging stations (EV POIs) by their identifiers. This guide covers how to build request options, make calls using the Search interface, and handle responses including partial successes.
In addition to common POI information, the EV POI Details API provides EV-specific availability information that is not available in the non-EV POI Details API. This guide covers EV charging station details only. For POIs in other categories, see Point of Interest details.
When to use EV POI Details
- After an EV Search to refresh information for selected charging stations.
- When you already know one or more EV charging station IDs and need their details.
EV POI Details options
Use the EvPoiDetailsOptions to define which EV POIs to fetch and the locale of the result text. You can request details for a single Place.Id or multiple IDs.
Single ID
1val options = buildEvPoiDetailsOptions(id) {2 locale = Locale.FRANCE3}
Multiple IDs
val ids: Set<Place.Id> = setOf(id1, id2)val options = buildEvPoiDetailsOptions(ids)
Making the request
To make a request, obtain a corresponding Search instance and call Search.requestEvPoiDetails with the options you built.
val result = search.requestEvPoiDetails(options)
Handling the response
The EvPoiDetailsResponse contains: - evPoiDetails: Set<EvPoiDetails> — details for successfully retrieved EV POIs. - failedIds: Set<Place.Id> — IDs that could not be resolved (invalid or non-EV POIs).
1when (result) {2 is com.tomtom.sdk.common.Result.Success -> {3 val evPoiDetails = result.value().evPoiDetails45 for (details in evPoiDetails) {6 val chargingPark = details.place.details?.chargingPark7 chargingPark?.chargingStations?.forEach { station ->8 station.chargingPoints.forEach { chargingPoint ->9 chargingPoint.status // Status indicates whether the point is available, occupied, etc.10 chargingPoint.connectors // Connectors provide information about the type of plug available11 }12 }13 // Map to your UI as needed14 // YOUR CODE GOES HERE15 }1617 if (result.value().failedIds.isNotEmpty()) {18 // Inform the user or retry for specific IDs19 // YOUR CODE GOES HERE20 }21 }22 is com.tomtom.sdk.common.Result.Failure -> {23 val failure: SearchFailure = result.failure()2425 // Show an error message to the user or log the error for debugging26 // YOUR CODE GOES HERE27 }28}
Partial success is possible: some IDs may succeed while others end up in failedIds.
If the call fails, you will receive a SearchFailure. Handle it gracefully and inform the user. For multi-ID requests, also check failedIds in successful responses.
Next steps
Since you have learned how to work with EV Search, here are recommendations for the next steps:
- EV Search — Find charging stations to retrieve IDs for details
- Point of Interest details — Details for non-EV POIs
- Reverse geocoding — Convert coordinates to addresses