Guides

Pylon setup

Display the current charging price and availability of chargers using a pricing pylon

Spirii offers support for displaying the current price of charging and the availability of charging spots at price pylons.

These are most famously known at traditional fuel stations, but they are also becoming more popular at public charging locations.

How to retrieve the charging price

To retrieve the current price of charging, you first need to call the GET Locations endpoint.

Use the Location ID as a query parameter for the geographical site where the chargers are located.

In the response, you will find the Tariff ID needed in the EVSEs -> Connectors array.


With the Tariff ID as the query parameter, you can get the current price information by calling the GET Tariff endpoint.

In the response, you will find the charging price per kWh in the price field price component array of the type ENERGY.

NOTE: If a more advanced tariff is set at the location, be sure to check if you get the price from the right price component array. If multiple conditional fees are added to the tariff, there can be multiple components and restrictions. For example, the price restrictions might include a certain time of day or days of the week that the price component is active.

OCPI structure

The Tariff module in Spirii's platform is structured based on the OCPI 2.1.1 standard. This means that tariffs can include multiple tariff elements, which in turn include price components and price restrictions. Similarly, the elements are processed from top to bottom when the list of elements contains more than 1 element, i.e., the first element with valid restrictions will be used.


How to retrieve the charger availability

To retrieve the current availability of chargers at the location, you can call the GET Locations endpoint.

Use the Location ID as a query parameter for the geographical site where the chargers are located.

In the response, you will find the charger status in the evses array. The total amount of EVSEs with the status set to available will provide you with the total number of available charging spots.