Fetch multiple EVChargers from the API at the same time

Hello,

I am implementing a system in my app which lets user favourite an EVCharger. I want to be able to synchronise that with their account. In order to do that, I will need to save the EVCharger to their firebase account. However, it will end up being too much data. I will end up saving only the UUID, Latitude and Longitude of the EVCharger, and if they login from another device, simply fetch the EVChargers from OpenChargeMap and save them locally. My question is, can I fetch all those EVChargers from one API call? Can I pass for example, an array of those latitudes and longitudes, in order to retrieve the EVChargers? I know I can do it one at a time, by passing a single latitude and longitude value each time. However, if they have favourited, for example 100 EVChargers, that will be 100 API calls. I would like to avoid that. Is there any way? Thank you!

Yours faithfully,
Iraklis Eleftheriadis

Yes, use the ID field of the POI (not the UUID, that’s basically unused). https://openchargemap.org/site/develop/api#/operations/get-poi

You can specify ?chargepointid=1234,5678,9876 (or we also support just ?id=)

If you want to have an area of interest instead of individuals points you can provide a boundingbox or a search polygon.

What do you mean the UUID is unused? Should I start working with only the ID Field instead?

Yes, that’s what I mean. When I originally designed the data model in 2011 a criticism was that it didn’t contain a globally unique identifier, but nobody is using it and OCM-[ID] works just as well from a global reference perspective.