Before you start
This playbook is for operators and owners of public charging in an AFIR member state. Each member state has its own NAP, so check its integration requirements first — in particular whether it consumes DATEX II (covered below) or OCPI (see the note at the end). You’ll also want the CPO ID or customer IDs whose data you’re publishing; contact your Spirii representative if you’re unsure which to use.The DATEX II endpoints
Two endpoints return AFIR data in DATEX II v3, the exchange format most National Access Points use:- Static data —
GET /v2/afir/energy-infrastructure-tablesreturns infrastructure metadata: sites and stations (locations and charge boxes), refill points and connectors, operating hours, and tariff information. - Dynamic data —
GET /v2/afir/energy-infrastructure-statusesreturns real-time availability and status, with tariff information.
If-Modified-Since header returns 304 Not Modified when nothing has changed.
If-Modified-Since on both to avoid re-fetching unchanged data.
Filter to the data you publish
Three filters scope the response, and can be combined — when you pass more than one, only assets matching all of them are returned.If your NAP uses OCPI
Where a National Access Point consumes OCPI rather than DATEX II, the same AFIR-required data is available through the OCPI-formatted Locations endpoint, with the Tariffs endpoint supplying the ad-hoc price breakdown (Article 20, paragraph 2(f)(3)). Unlike the DATEX II endpoints, this route uses your API key.
Related
AFIR static data
The DATEX II v3 infrastructure tables endpoint.
AFIR dynamic data
The DATEX II v3 real-time status endpoint.
Locations
The site data behind both the DATEX II and OCPI routes.