How to get all ConnectionTypes

HI there,
I am currently a University student and using the API for my final year Individual Project.
I have created a mobile app and one of my requirements will allow the potential user to search by a certain charger type.
For example if a user was to search “Type 2” or “CHAdeMO” then it will list all of those chargers in a given range.
The issue I’m having is that I don’t know how I can get the json API to do this.
At the moment I have hard coded two connector types as a proof of concept:
Type 2 for id 25
Type G for id 3

When a user searches for one of these criteria’s (eg “Type 2”) an API call is made to find chargers with id number 25 (connectiontypeid=25)

I was wondering if there is a way that I can get all of the connection types so that I can compare these when a user searches for a certain criteria? I also would like the user to be able to input something like “50w” and be greeted with 50w charging stations.

Thanks again, and apologies to my lack of knowledge.

Kind regards,
Amir.

Hi Amir,

If I understand you correctly, you want to be able to list the different connection types available. You can do this using https://api.openchargemap.io/v3/referencedata/ which returns a JSON file of all the lookup values, including ConnectionTypes which you could then display to the user.

I don’t believe there is a way to search for stations that have a specific power output. There is, however, a minpowerkw parameter that limits all of the chargers to be above a specific threshold.

Optionally, you can download all the data from the github repository here

I hope this helps!

1 Like

Hi Rascalitoes,
I didn’t notice the referencedata call on the documentation and this is perfect for getting all of the ConnectionTypes! Thank you!

And I have just checked the github repository and the reference.json would also work as well.

Thank you very much!
Amir

1 Like