Locations module

Roam OCPI implementation of OCPI 2.2.1 locations module

Locations module adjustments

DeviationPlugsurfing solution
Tariff inlined in locations objectThe relevant tariffs are inlined on the connector
PUSH of Locations / EVSEs / connectors not supportedAn EMP can do very frequent (up to once per minute) delta pulls to get the locations that have been updated since the last delta pull
No deep paginationA hash to the next page is provided as part of the Link header
Location field validationsRelaxed validations, as specified below, to accept locations that are not fully OCPI compliant

Tariff inlined in locations object

The relevant tariffs are inlined on the connector, via the location module. Using delta pulls (date_from/date_to) will return locations where the location data or the tariff data has changed. The response has the tariff object inlined for each connector. You can do delta pulls up to once per minute.

Example:

{
  // location properties...
  "evses": [
    {
      // evse properties...
      "connectors": [
        {
          "id": "ec00d01637753c4c4acd8e67d09b8b94a80f",
          "standard": "Type2",
          "power_type": "AC_3_PHASE",
          "max_voltage": 230,
          "max_amperage": 32,
          "max_electric_power": 22000,
          "tariffs": [
            {
              "country_code": "SE",
              "party_id": "CPO",
              "id": "6307fc109da88e3a_7e27b28369e4c986",
              "currency": "SEK",
              "elements": [
                {
                  "price_components": [
                    {
                      "type": "ENERGY",
                      "price": 0.7016,
                      "step_size": 1
                    }
                  ]
                }
              ],
              "last_updated": "2025-05-27T00:55:25.634Z"
            }
          ],
          "last_updated": "2024-12-06T04:40:10Z"
        }
      ]
    }
  ],
  "operator": {
    "name": "CPO Name"
  },
  "time_zone": "Europe/Stockholm",
  "last_updated": "2025-02-13T16:13:23.783Z"
}

PUSH of Locations / EVSEs / connectors not supported

Plugsurfing does not support pushing updates of charging stations. The amount of updates that Plugsurfing receives from CPOs would lead to a massive amount of data being sent through to all partners if it would be shared unfiltered. Instead, you can do delta pulls which will give you the necessary location updates without unnecessary traffic.

Pagination

For performance reasons Plugsurfing doesn’t use deep pagination, instead a hash to the next page is provided as part of the Link header (The header will contain an additional query param named smart_paging). If your OCPI implementation already follows the Link header, no changes are needed.

Example getting page 1

Request:

GET https://ocpi-stage.plugsurfing.com/cpo/2.2.1/locations?offset=0&limit=100

Response header (if another page exist):

Link: <https://ocpi-stage.plugsurfing.com/cpo/2.2.1/locations/?offset=100&limit=100&smart_paging=hash1>; rel="next"

Example getting page 2

Request:

GET https://ocpi-stage.plugsurfing.com/cpo/2.2.1/locations?offset=100&limit=100&smart_paging=hash1

Response header (if another page exist):

Link: <https://ocpi-stage.plugsurfing.com/cpo/2.2.1/locations/?offset=200&limit=100&smart_paging=hash2>; rel="next" 

Location field validations

Plugsurfing is a bit more lenient than the OCPI specification for a set of properties when receiving Locations from CPOs. This means outgoing Locations from Plugsurfing will also not fully comply with the OCPI specification for these fields.

FieldOCPI specificationPlugsurfing implementation
coordinates.latitude5-7 decimals4-8 decimals
coordinates.longitude5-7 decimals4-8 decimals
addressstring(45)string(255)
citystring(45)string(255)
statestring(20)string(255)

EVSE capabilities

The following capabilities are not supported, and they will be stripped from the EVSEs returned via the API:

  • CHARGING_PROFILE_CAPABLE
  • CHARGING_PREFERENCES_CAPABLE
  • RESERVABLE
  • TOKEN_GROUP_CAPABLE
  • UNLOCK_CAPABLE


What’s Next