The OCPI Locations module is how a CPO (coming soon) tells every eMSP where its chargers are, what they can do, and whether they are free right now. It is the module an eMSP app cannot work without, and the one where small modelling errors show up directly on a driver’s map. This page is the reference for OCPI 2.2.1: each object’s fields with required flags, the EVSE status values, the exact PUT and PATCH rules, why nothing is ever deleted, and what 2.3.0 adds. Everything below was checked against the 2.2.1 Locations module text. For a full GET request and response on the wire, see OCPI request examples.
What the OCPI Locations module covers
- Module identifier:
locations. Data owner: CPO. - Sender interface (CPO): GET a paginated list, or GET one Location, EVSE or Connector.
- Receiver interface (eMSP, NSP): GET, PUT and PATCH at Location, EVSE or Connector level. POST and DELETE are n/a.
- Advised direction: push from CPO to receiver during normal operation, to keep update latency low. Pull is for the first sync and for when the receiver is not sure its cache is complete.
- Dependency: the Receiver endpoint depends on the Tariffs module, because Connectors reference tariffs by ID.
The model has three levels. A Location is a site, an EVSE is the part that supplies one EV in one session, and a Connector is a socket or a cable with a plug. Only one Connector on an EVSE can be in use at a time.
flowchart LR
Loc[Location: one site] --> E1[EVSE uid 3256]
Loc --> E2[EVSE uid 3257]
E1 --> C1[Connector 1: CCS2 cable]
E1 --> C2[Connector 2: CHAdeMO cable]
E2 --> C3[Connector 1: Type 2 socket]
style Loc fill:#dbeafe,stroke:#2563eb
OCPP 2.0 has a different three-tier model (Charge Point, EVSE, Connector). When mapping it, the spec prefers one OCPI Location for a group of Charge Points at the same site over one Location per Charge Point, because a driver cares how many EVSEs are free, not how many cabinets hold them. The OCPI vs OCPP vs ISO 15118 overview shows where each protocol’s job starts and stops.
Location object fields
Cardinality: 1 required, ? optional, * optional list, + at least one.
| Field | Type | Card. | What to know |
|---|---|---|---|
country_code, party_id | CiString(2), (3) | 1 | The owning CPO |
id | CiString(36) | 1 | Unique within the CPO; can never be changed |
publish | boolean | 1 | false hides it from apps except for tokens in publish_allowed_to |
publish_allowed_to | PublishTokenType | * | Only when publish is false |
name | string(255) | ? | Display name |
address, city | string(45) | 1 | Street and number; city or town |
postal_code | string(10) | ? | Omit only where none exists |
state | string(20) | ? | Only when relevant |
country | string(3) | 1 | ISO 3166-1 alpha-3, unlike country_code |
coordinates | GeoLocation | 1 | Latitude and longitude as strings |
time_zone | string(255) | 1 | IANA name, such as Europe/Amsterdam |
evses | EVSE | * | The charging points |
last_updated | DateTime | 1 | Changes when the Location or any child changes |
The optional rest: related_locations, parking_type (ALONG_MOTORWAY, PARKING_GARAGE, PARKING_LOT, ON_DRIVEWAY, ON_STREET, UNDERGROUND_GARAGE), directions, operator, suboperator, owner, facilities, opening_times, charging_when_closed (defaults to true), images and energy_mix. If operator is omitted, receivers use the business details from the Credentials exchange for that country_code and party_id.
Coordinates must match the regex -?[0-9]{1,2}\.[0-9]{5,7} for latitude and -?[0-9]{1,3}\.[0-9]{5,7} for longitude. Sending them as JSON numbers, or with fewer than five decimals, fails a strict receiver, and the rejection arrives as a status code inside the response envelope, covered in OCPI error responses explained.
EVSE and Connector fields
EVSE
| Field | Type | Card. | What to know |
|---|---|---|---|
uid | CiString(36) | 1 | Technical ID used in URLs; can never be changed |
evse_id | CiString(48) | ? | eMI3 EVSE ID shown to drivers |
status | Status | 1 | Live state, see the next section |
status_schedule | StatusSchedule | * | Planned future status, such as maintenance |
capabilities | Capability | * | RFID_READER, REMOTE_START_STOP_CAPABLE, RESERVABLE, CREDIT_CARD_PAYABLE and others |
connectors | Connector | + | At least one |
floor_level, physical_reference | string(4), (16) | ? | Garage floor; number printed on the unit |
coordinates | GeoLocation | ? | When the EVSE sits apart from the Location point |
directions, images | * | Local directions; photos | |
parking_restrictions | ParkingRestriction | * | EV_ONLY, PLUGGED, DISABLED, CUSTOMERS, MOTORCYCLES |
last_updated | DateTime | 1 | Changes when the EVSE or a Connector changes |
Connector
| Field | Type | Card. | What to know |
|---|---|---|---|
id | CiString(36) | 1 | Unique within its EVSE only |
standard | ConnectorType | 1 | IEC_62196_T2, IEC_62196_T2_COMBO, IEC_62196_T1_COMBO, CHADEMO and others |
format | ConnectorFormat | 1 | SOCKET (bring a cable) or CABLE (attached) |
power_type | PowerType | 1 | AC_1_PHASE, AC_2_PHASE, AC_2_PHASE_SPLIT, AC_3_PHASE, DC |
max_voltage | int | 1 | Volts, line to neutral for AC_3_PHASE |
max_amperage | int | 1 | Amperes |
max_electric_power | int | ? | Watts; set it when the real limit is below volts times amps |
tariff_ids | CiString(36) | * | Tariffs valid now; one active per tariff type |
terms_and_conditions | URL | ? | Operator terms |
last_updated | DateTime | 1 |
If the enum values for plugs are unfamiliar, EV charging connectors explained maps each to the physical connector.
EVSE status values
status is required on the EVSE, and the Connector has no status field at all.
| Value | Spec meaning | Show the driver |
|---|---|---|
AVAILABLE | Able to start a new session | Free |
BLOCKED | Not accessible, for example a car in the bay | Blocked |
CHARGING | In use | Busy |
INOPERATIVE | Not yet active or temporarily unavailable, not broken | Unavailable |
OUTOFORDER | Broken or defective parts | Out of order |
PLANNED | Planned, operating soon | Coming soon |
REMOVED | Discontinued or removed | Hide it |
RESERVED | Reserved for a particular driver | Reserved |
UNKNOWN | No status information, also used when offline | Status unknown |
The status usually originates in the charger’s OCPP messages to the CPO backend; OCPP StatusNotification in depth covers that side.
Because status lives on the EVSE, a post with two plugs that are one EVSE cannot say “only the CCS plug is broken”. OCPP 1.x has no EVSE concept, and the spec’s answer for those chargers is that the CPO SHOULD publish each connector as its own EVSE, so a StartSession command targets the right plug. When one connector of the physical EVSE becomes unavailable, all its virtual EVSEs are set unavailable too, following the Open Charge Alliance application note on multiple connectors per EVSE.
A minimal valid Location in JSON
Every required field at every level, plus name and a tariff reference. This parses as-is:
{
"country_code": "NL",
"party_id": "TNM",
"id": "LOC1",
"publish": true,
"name": "Central Station Garage",
"address": "Stationsplein 1",
"city": "Amsterdam",
"postal_code": "1012 AB",
"country": "NLD",
"coordinates": { "latitude": "52.379189", "longitude": "4.899431" },
"evses": [
{
"uid": "3256",
"evse_id": "NL*TNM*E3256",
"status": "AVAILABLE",
"capabilities": ["RFID_READER", "REMOTE_START_STOP_CAPABLE"],
"connectors": [
{
"id": "1",
"standard": "IEC_62196_T2",
"format": "SOCKET",
"power_type": "AC_3_PHASE",
"max_voltage": 230,
"max_amperage": 32,
"max_electric_power": 22000,
"tariff_ids": ["AC-OFFPEAK-2026"],
"last_updated": "2026-10-28T09:00:00Z"
}
],
"last_updated": "2026-10-28T09:00:00Z"
}
],
"time_zone": "Europe/Amsterdam",
"last_updated": "2026-10-28T09:00:00Z"
}
max_voltage is 230 here, not 400, because the spec defines it line to neutral for three-phase AC. 230 V times 32 A times three phases gives the 22 kW in max_electric_power.
Push updates: PUT and PATCH at three levels
Receiver URLs carry the owner, because Locations are client-owned objects:
{locations_url}/{country_code}/{party_id}/{location_id}[/{evse_uid}][/{connector_id}]
PUT creates or replaces whatever the URL points at: a whole Location, one EVSE, or one Connector. A PUT with a new EVSE uid adds that EVSE. The body must contain all required fields of that object, and the URL’s country_code and party_id SHALL match the body.
PATCH sends only the fields that changed. Everything not in the body is unchanged, so PATCH cannot remove information shared earlier. Every PATCH SHALL contain last_updated. The spec calls this EVSE status update the most common Locations message:
PATCH /ocpi/emsp/2.2.1/locations/NL/TNM/LOC1/3256 HTTP/1.1
Authorization: Token <token the eMSP issued to this CPO>
Content-Type: application/json
{ "status": "CHARGING", "last_updated": "2026-11-04T08:15:02Z" }
A connector-level PATCH is how a price change reaches a plug, for example { "tariff_ids": ["AC-OFFPEAK-2026"], "last_updated": "..." } on /LOC1/3256/1.
Parent timestamps. When a PUT or PATCH targets an EVSE, the receiver SHALL set the new last_updated on the parent Location. When it targets a Connector, the receiver SHALL set it on the parent EVSE and Location. The CPO must do the same in its own store, or a delta GET filtered on last_updated will skip the change. For the trade-offs between this push stream and polling, see OCPI pull vs push patterns.
Removing an EVSE: there is no DELETE
DELETE is n/a in the Receiver interface. Sessions and other modules reference Locations, EVSEs and Connectors, and those links would break if the objects could vanish. Instead:
- To remove an EVSE, the CPO MUST set its
statustoREMOVEDand send it with PUT or PATCH. - A Location with no valid EVSE can be treated as expired and should no longer be shown.
- To announce a removal in advance, use
status_schedule. evse_idis optional precisely so it can be dropped from aREMOVEDEVSE and reused on new hardware. Theuidstays.
The spec requires the status change, so do not rely on simply leaving the EVSE out of the next Location PUT.
Pulling Locations: list and single object
The Sender’s GET list takes date_from (inclusive), date_to (exclusive), offset and limit, and pages with the Link, X-Total-Count and X-Limit headers. Two rules change how a client must treat the result:
- A full list is the new truth. For a paginated response, the data from all pages together replaces what the client held; anything not in any page is no longer valid.
- Single objects are addressable.
GET {locations_url}/{location_id}[/{evse_uid}][/{connector_id}]returns one Location, EVSE or Connector. A receiver without a push endpoint can use it to refresh one site.
A pushed PATCH that is lost leaves a record that looks plausible and is wrong, and nothing flags it. That is the case for a scheduled full sync even on a healthy push connection. OCPI integration pitfalls covers paging and timestamp traps shared by all modules.
publish, publish_allowed_to and private chargers
publish: false means apps and websites SHALL NOT show the Location, except to the owner of a token that matches an entry in publish_allowed_to. Use it for an apartment garage or a depot that only certain cards should see. If one site has both public and restricted EVSEs, the spec says to create two Locations. Private chargers that need neither publishing nor remote control SHOULD NOT be sent through Locations at all; CDRs still work without them.
The evse_id format
evse_id follows the eMI3 EVSE ID: country code, operator ID, the ID type E, then the outlet ID. NL*TNM*E3256 and NLTNME3256 are the same ID, since the * separators are optional. Without separators, the E is the sixth character, and it is the part people drop or replace with S (station) or P (pool). Receivers that validate the format reject those. The EVRoaming Foundation’s ID format and syntax whitepaper has the full grammar. Never use evse_id as a key; that is what uid is for.
Common mistakes and what the spec says
| Mistake | What the spec says | Fix |
|---|---|---|
| Status sent on a Connector | Connector has no status | PATCH the EVSE |
| DELETE to remove an EVSE | DELETE is n/a | Status REMOVED via PUT or PATCH |
PATCH without last_updated | Every PATCH SHALL contain it | Always send the new timestamp |
| Child update, parent timestamp unchanged | Parents’ last_updated must move | Propagate on both sides |
| PATCH applied as a full replace | Absent fields are unchanged | Merge into the stored object |
country as NL | country is alpha-3 | NLD; country_code stays NL |
| Coordinates as numbers | Strings matching a regex | "52.379189" |
max_electric_power in kW | Watts | 22 kW is 22000 |
uid changed after a hardware swap | uid and id can never change | Keep the IDs; update the fields |
| Pages merged into the old cache | All pages together are the new truth | Drop what no page returned |
What changes in OCPI 2.3.0
Per the 2.3.0 Locations text, published in February 2025, the endpoints and the no-DELETE rule stay the same, and the EVSE still carries the status. The additions:
- Location
help_phone, a number a driver can call for assistance. - Location
parking_places, a list of Parking objects (vehicle types, dimensions, restrictions,roofed,lightingand more), referenced from each EVSE through a newparkingfield. - EVSE
accepted_service_providers, the eMSPs whose contracts are accepted there. The spec says it was added so European CPOs can supply this to National Access Points. - Connector
capabilities, includingISO_15118_2_PLUG_AND_CHARGEandISO_15118_20_PLUG_AND_CHARGE. - New values such as
MCSandSAE_J3400in ConnectorType, andEMPLOYEES,TAXISandTENANTSin ParkingRestriction. - Open enums. ConnectorType, Capability, Facility, ParkingType, ParkingRestriction and others become OpenEnum, which allows values beyond the listed ones. A receiver that hard-fails on an unknown enum string will break on 2.3.0 data.
What is new in OCPI 2.3.0 covers the rest of the release, and the OCPI version history traces how the module evolved.
What it means in practice
Locations is the only module where the receiver keeps a mirror of the sender’s data and has to keep it right indefinitely. Sessions and CDRs are event streams, so a lost message leaves a gap you can reconcile. A lost Locations PATCH leaves a charger shown as free that is not, and no error appears anywhere. The rules worth enforcing in code are the ones above that keep the mirror honest: status only on the EVSE, a timestamp on every write and on every parent, REMOVED instead of DELETE, and a full sync that is allowed to delete what it did not see.