Skip to main content

EV Public Locations 2.0.4

EV Public Locations and Charging API SDK

Mobility EV Solutions SDK helps to interact with EV locations and Charge sessions API from Java application.

Locations API provides the list of all Shell Recharge locations. The list includes all Shell Recharge network and all locations available through our roaming partners.

Charge Sessions API provides the option to manage charging at Shell Recharge locations. The end points provides control to start, stop and get status of the charging session.

Supported Functions

  • Get the list of all the locations and its details.
  • Get the details of a particular location.
  • Get the list of location nearby using the latitude and longitude.
  • Get the list of locations for a given set of bounds with different zoom levels.
  • Start a charging session
  • Stop a charging session
  • Retrieve the status of a charging session
  • Retrieve the list of all active sessions for a card

Supported Java Versions

This library supports the following Java implementations:

  • OpenJDK 8
  • OpenJDK 11
  • OpenJDK 17

API methods

This Java Library contains the following java methods to access the Location and Changing API resources.

Method Description
getLocations(String clientid, String clientSecret) This API Method provides the list of all Shell Recharge locations.The list includes all Shell Recharge network and all locations available through our roaming partners
getLocationWithFilter(String clientid, String clientSecret, String Query) This API Method provides list of shell rechargelocations based more filter criteria such as evse status ,connector type..etc
getLocationById(String clientid, String clientSecret, String Id) This API Method provides the details on a single Shell Recharge location.The query for a single location is to be made using the Unique Internal identifier used to refer to this Location by Shell Recharge. (Uid from List of locations API)
getLocationNearBy(String clientid, String clientSecret, String latitude, String longitude) This API Method provides the list of all nearby Shell Recharge locations based on the latitude and longitude provided in the request
getLocationNearByWithFilter(String clientid, String clientSecret, String Query) This API Method provides the list of all nearby Shell Recharge locations based on the latitude and longitude provided in the request also with other seacrh criteria (evseid,evsestatus)
getLocationByMarkers(String clientid, String clientSecret, String east, String west, String north,String south, String zoom) This API Method provides locations based on given a set of bounds on the geographical front (East,West, North, South) will return a set of Markers that fall within the requested bounds.
getLocationByMarkersWithFilter(String clientid, String clientSecret, String query) This API Method provides locations based on given a set of bounds on the geographical front (East,West, North, South) along with other search criterial . Refer OAS spec for list of seach criteria
startChargesession(String clientid, String clientSecret, String EvChargeNumber,String EvseId) This API Method allows to start the chargesession using evseid and EVNumber.
stopChargesession(String clientid, String clientSecret, String sessionid) This API Method accepts a request to stop an active session when a valid session id is provided.
retrieveChargesession(String clientid, String clientSecret, String sessionid) This API method returns all the endeturns details of the session like session status, start and stop datetime, , if the session is found.
getActiveChargesession(String clientid, String clientSecret, String EmaId) This API method gives back a list of active sessions for user.

Get Locations API

import java.io.IOException;
import shell.ev.locations.*;

public class Test {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "****************";

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

        //Geting EV location thorugh get locations API using using getLocations method

        System.out.println(ev.getLocations(client_id,client_secret));

    }
}

Get Locations By ID


import java.io.IOException;
import shell.ev.locations.*;

public class EVSoultions {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "******************";
        String location_id = "5";

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

                //Geting EV location thorugh get locations API using using getLocations method

                System.out.println(ev.getLocationById(client_id, client_secret, location_id));

    }

}

Get NearBy Locations

Example :1
import java.io.IOException;
import shell.ev.locations.*;

public class EVSoultions {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "******************";
        String latitude = "52.3642070";
        String longitude = "4.8917930";

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

                //Getting near by  EV location thorugh through latitude and longitude

                System.out.println(ev.getLocationNearBy(client_id,client_secret,latitude,longitude));

    }

}
Example 2

Refer the open API spec for the allowed query params for this API


import java.io.IOException;
import shell.ev.locations.*;

public class EVSoultions {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "******************";
        String latitude = "52.3642070";
        String longitude = "4.8917930";
        String evseId ="NL*TNM*EVIRTUALCP0002*0";
        String west = "";
        String zoom = "";

        //Constructing query param values

       String  Query = "latitude="+latitude+"&"+"longitude="+longitude + "&"+"evseId="+evseId;

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

                //Getting near by  EV location thorugh through latitude,longitude and other queryparams values

                System.out.println(ev.getLocationNearByWithFilter(client_id, client_secret, Query));

    }

}

Get Location by Markers

Example 1

import java.io.IOException;
import shell.ev.locations.*;

public class EVSoultions {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "******************";
        String east = "4.87335773540221";
        String west = "52.320513814822";
        String north ="4.87335773540221";
        String south = "4.87335773540221";
        String zoom = "16";

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

                //Getting near by  EV location through location markers

                System.out.println(ev.getLocationByMarkers(client_id, client_secret, east, west, north, south, zoom));

    }

}
Example 2

Refer the open API spec for the allowed query params for this API


import java.io.IOException;
import shell.ev.locations.*;

public class EVSoultions {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "******************";
        String east = "4.87335773540221";
        String west = "52.320513814822";
        String north ="4.87335773540221";
        String south = "4.87335773540221";
        String zoom = "16";
        String evseStatus ="Available";

        String Query = "east="+east+"&"+"west="+west+"&"+"north="+north+"&"+"south="+south+"&"+"zoom="+zoom+"&"+"evseStatus="+evseStatus;       

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

                //Getting near by  EV location through location markers with other queryparams

                System.out.println(ev.getLocationByMarkersWithFilter(client_id,client_secret,Query));

    }

}

Start Charging Session


import java.io.IOException;
import shell.ev.locations.*;

public class EVSoultions {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "******************";
        String EVChargeNumber = "NL-TNM-216599-x";
        String EvseId = "NL*TNM*EVIRTUALCP0002*0";

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

                // Start Charging Session

                System.out.println(ev.startChargesession(client_id,client_secret, EVChargeNumber, EvseId));

    }

}

Retrieve Charging Session


import java.io.IOException;
import shell.ev.locations.*;

public class EVSoultions {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "******************";
        String SessionId = "da224e13-3af1-438f-8a20-80bec68e8495";

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

                //Retrive the chargesession information for the particular session id

                System.out.println(ev.retrieveChargesession(client_id, client_secret, SessionId));

    }

}

Retrieve Active Session


import java.io.IOException;
import shell.ev.locations.*;

public class EVSoultions {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "******************";
        String EmaId = "NL-TNM-C0216599X-A";

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

                //Retrieve Active session information for the given EmaId

                System.out.println(ev.getActiveChargesession(client_id, client_secret, EmaId));

    }

}

Stop Charging Session


import java.io.IOException;
import shell.ev.locations.*;

public class EVSoultions {

    public static void main(String[] args) throws  InvalidEnvironment, IOException {

        String client_id = "******************";
        String client_secret = "******************";
        String Sessionid = "d378650e-e890-46d4-837d-3259c72ed333";  

        //Initializing object for non-prod API testing

        EVLocations ev = new EVLocations("test");

                //Stop Active Charging Session

                System.out.println(ev.stopChargesession(client_id, client_secret, Sessionid));

    }

}

Download SDK

Please select the language you would like to download for the SDK below

Downloads

Download
evlocations.zip (for Java)

About us

The Shell Developer Portal is here to support partners to onboard to Shell APIs, the portal is here to take ideas to production

 

Shell logo

Login to your account