GuidesAPI Reference
Guides

How to find EV charging points

The user plans a trip with an electric vehicle and needs to visit various waypoints. To take into account the time needed for recharging the vehicle, the parameter evChargingTimePerDistance can be used.

Background information

The HERE Waypoints Sequence API v8 can calculate the time used for charging an electric vehicle (EV) between the waypoints. This is done following a simple model: the assumption is that in a fixed time the energy for a certain distance can be charged into the vehicle.

The user can define a distance and how much time is needed to get the vehicle charged to the appropriate level.

Charging times are controlled by the URL parameter evChargingTimePerDistance=timeInSecondsToRegainChargingLevel,distanceInMeterUntilRecharge.

The time required for charging is accounted as rest time, as the assumption is that the driver has nothing else to do:

  • Without legal rest times - All times in the response marked as "rest" are times required for charging the vehicle
  • With legal rest times - It is assumed that normal rest times are used for charging. If the driver rest time is equal to or exceeds the required charging time, no additional time is added. If the driver rest time is not long enough, the required additional charging time is added to the rest time.

All rest and charging times are provided in a summary form between each two waypoints. Charging at destinations is not supported. It can be added to the service time.

Partial charging is not supported. If charging is required to reach the last waypoint, the vehicle is fully charged before reaching it.

The refined charging times can be calculated using the HERE Routing API.

Request

curl -H "Authorization: Bearer BEARER_TOKEN" "https://wps.hereapi.com/v8/findsequence2?departure=2016-10-14T07:30:00Z&mode=fastest;truck;traffic:disabled;&start=Warsaw;52.2356,21.01038&end=Copenhagen;55.68524,12.57106;st:900&destination1=Berlin;52.51605,13.37691;st:300&evChargingTimePerDistance=7200,300000"

Response

{
  "results": [
    {
      "waypoints": [
        {
          "id": "Warsaw",
          "lat": 52.2356,
          "lng": 21.01038,
          "sequence": 0,
          "estimatedArrival": null,
          "estimatedDeparture": "2016-10-14T07:30:00Z",
          "fulfilledConstraints": []
        },
        {
          "id": "Berlin",
          "lat": 52.51605,
          "lng": 13.37691,
          "sequence": 1,
          "estimatedArrival": "2016-10-14T16:49:02Z",
          "estimatedDeparture": "2016-10-14T16:54:02Z",
          "fulfilledConstraints": [
            "st:300"
          ]
        },
        {
          "id": "Copenhagen",
          "lat": 55.68524,
          "lng": 12.57106,
          "sequence": 2,
          "estimatedArrival": "2016-10-15T04:09:02Z",
          "estimatedDeparture": null,
          "fulfilledConstraints": [
            "st:900"
          ]
        }
      ],
      "distance": "1010126",
      "time": "75242",
      "interconnections": [
        {
          "fromWaypoint": "Warsaw",
          "toWaypoint": "Berlin",
          "distance": 573801,
          "time": 26342,
          "rest": 7200,
          "waiting": 0
        },
        {
          "fromWaypoint": "Berlin",
          "toWaypoint": "Copenhagen",
          "distance": 436325,
          "time": 26100,
          "rest": 14400,
          "waiting": 0
        }
      ],
      "description": "Targeted best time; without traffic",
      "timeBreakdown": {
        "driving": 52442,
        "service": 1200,
        "rest": 21600,
        "waiting": 0
      }
    }
  ],
  "processingTimeDesc": "959ms",
  "responseCode": "200",
  "warnings": null,
  "requestId": null
}