EV Protocols API Reference
Complete API reference for all EV charging protocol endpoints.
Mercedes-Benz API
Get Battery Status
Endpoint: POST /api/v1/mercedes/battery-status
Request:
{
"vehicle_id": "WDD1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"soc_percent": 68.0,
"range_km": 340,
"charging_status": "NOT_CHARGING",
"plug_status": "UNPLUGGED"
}
Unlock Charge Port
Endpoint: POST /api/v1/mercedes/unlock
Request:
{
"vehicle_id": "WDD1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"status": "success",
"command": "doors/unlock",
"timestamp": "2026-02-05T12:00:00Z"
}
Start Charging
Endpoint: POST /api/v1/mercedes/start-charging
Request:
{
"vehicle_id": "WDD1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"status": "success",
"command": "charge/start"
}
BMW ConnectedDrive API
Get Battery Status
Endpoint: POST /api/v1/bmw/battery-status
Request:
{
"vehicle_id": "WBA1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"soc_percent": 72.0,
"range_km": 380,
"charging_status": "CHARGING",
"charging_power_kw": 11.0,
"time_to_full_min": 45
}
Unlock Charge Port
Endpoint: POST /api/v1/bmw/unlock
Request:
{
"vehicle_id": "WBA1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"status": "success",
"command": "CHARGE_FLAP_UNLOCK",
"timestamp": "2026-02-05T12:00:00Z"
}
Get Vehicle Location
Endpoint: POST /api/v1/bmw/location
Request:
{
"vehicle_id": "WBA1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"latitude": 52.520008,
"longitude": 13.404954,
"heading": 180
}
VW Group API
Supports Volkswagen (We Connect), Audi (myAudi), and Porsche (Porsche Connect).
Get Battery Status
Endpoint: POST /api/v1/vwgroup/battery-status
Request:
{
"vehicle_id": "WVWZZZ1KZAP123456",
"access_token": "YOUR_ACCESS_TOKEN",
"brand": "vw"
}
Parameters:
brand:vw,audi, orporsche
Response:
{
"soc_percent": 75.0,
"range_km": 420,
"charging_status": "READY_FOR_CHARGING",
"charging_power_kw": 0,
"plug_status": "CONNECTED",
"remaining_time_min": 0
}
Unlock Charge Port
Endpoint: POST /api/v1/vwgroup/unlock
Request:
{
"vehicle_id": "WVWZZZ1KZAP123456",
"access_token": "YOUR_ACCESS_TOKEN",
"brand": "vw"
}
Response:
{
"status": "success",
"command": "chargingPortUnlock",
"timestamp": "2026-02-05T12:00:00Z"
}
Set Charge Limit
Endpoint: POST /api/v1/vwgroup/charge-limit
Request:
{
"vehicle_id": "WVWZZZ1KZAP123456",
"access_token": "YOUR_ACCESS_TOKEN",
"brand": "vw",
"target_soc": 80
}
Response:
{
"status": "success",
"command": "setChargeLimit",
"target_soc": 80
}
Additional Vehicle Manufacturers
All manufacturers below support the same standard endpoints: battery status, start/stop charging, lock/unlock, climate control, location, and charge limit.
Hyundai Bluelink
Base Path: /api/v1/hyundai/*
Models: Ioniq 5, Ioniq 6, Kona Electric
Kia Connect
Base Path: /api/v1/kia/*
Models: EV6, EV9, Niro EV, Soul EV
Nissan Connect
Base Path: /api/v1/nissan/*
Models: Leaf, Ariya
Ford FordPass
Base Path: /api/v1/ford/*
Models: Mustang Mach-E, F-150 Lightning
Special: Frunk control endpoint
Rivian
Base Path: /api/v1/rivian/*
Models: R1T, R1S
Special: Gear tunnel, tonneau cover control
Polestar
Base Path: /api/v1/polestar/*
Models: Polestar 2, Polestar 3
Volvo
Base Path: /api/v1/volvo/*
Models: XC40 Recharge, C40 Recharge
Porsche
Base Path: /api/v1/porsche/*
Models: Taycan
Standard Endpoints
All vehicle manufacturer APIs support these endpoints:
Battery Status
POST /api/v1/{manufacturer}/battery-status
Start Charging
POST /api/v1/{manufacturer}/start-charging
Stop Charging
POST /api/v1/{manufacturer}/stop-charging
Lock Vehicle
POST /api/v1/{manufacturer}/lock
Unlock Vehicle
POST /api/v1/{manufacturer}/unlock
Start Climate
POST /api/v1/{manufacturer}/climate-start
Get Location
POST /api/v1/{manufacturer}/location
Set Charge Limit
POST /api/v1/{manufacturer}/set-charge-limit
ISO 15118 API
Vehicle Handshake
Initiate ISO 15118 session with vehicle.
Endpoint: POST /api/v1/iso15118/handshake
Request:
{
"vehicle_id": "veh_001",
"vin": "5YJ3E1EA1KF123456",
"services": ["AC_1", "DC"],
"max_power_kw": 150,
"battery_capacity": 75,
"certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
}
Response:
{
"vehicle_id": "veh_001",
"vin": "5YJ3E1EA1KF123456",
"protocol_version": "ISO15118-20",
"supported_services": ["AC_1", "DC"],
"certificate_valid": true,
"max_charge_power_kw": 150.0,
"battery_capacity_kwh": 75.0
}
Authenticate Vehicle
Plug & Charge authentication using PKI certificates.
Endpoint: POST /api/v1/iso15118/authenticate
Request:
{
"vehicle_id": "veh_001",
"certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
"challenge": "optional_challenge_string"
}
Response:
{
"status": "Accepted",
"auth_token": "iso15118_veh_001_1738758000",
"expires_at": "2026-02-06T12:00:00Z"
}
Unlock Charge Port
Send unlock command to vehicle charging port.
Endpoint: POST /api/v1/iso15118/unlock
Request:
{
"vehicle_id": "veh_001"
}
Response:
{
"status": "unlocked",
"vehicle_id": "veh_001",
"timestamp": "2026-02-05T12:00:00Z"
}
Lock Charge Port
Lock charging port after session completion.
Endpoint: POST /api/v1/iso15118/lock
Request:
{
"vehicle_id": "veh_001"
}
Response:
{
"status": "locked",
"vehicle_id": "veh_001"
}
Get Battery Status
Query vehicle battery state and charging parameters.
Endpoint: POST /api/v1/iso15118/battery-status
Request:
{
"vehicle_id": "veh_001"
}
Response:
{
"soc_percent": 65.5,
"capacity_kwh": 75.0,
"remaining_kwh": 49.125,
"max_charge_power_kw": 150.0,
"target_soc_percent": 80.0,
"estimated_time_to_full_min": 58
}
Start Charging Session
Initiate charging session with negotiated parameters.
Endpoint: POST /api/v1/iso15118/start-session
Request:
{
"vehicle_id": "veh_001",
"robot_id": "robot_001",
"params": {
"max_voltage_v": 400,
"max_current_a": 375,
"max_power_kw": 150,
"energy_request_kwh": 20,
"departure_time": "2026-02-05T18:00:00Z"
}
}
Response:
{
"session_id": "iso15118_veh_001_1738758000",
"status": "started",
"charging_params": {
"max_voltage_v": 400,
"max_current_a": 375,
"max_power_kw": 150,
"energy_request_kwh": 20
},
"estimated_completion": "2026-02-05T13:00:00Z"
}
Stop Charging Session
Terminate active charging session.
Endpoint: POST /api/v1/iso15118/stop-session
Request:
{
"session_id": "iso15118_veh_001_1738758000"
}
Response:
{
"status": "stopped",
"session_id": "iso15118_veh_001_1738758000",
"end_time": "2026-02-05T12:30:00Z"
}
Power Delivery
Control actual power flow during charging session. Implements real-time power negotiation.
Endpoint: POST /api/v1/iso15118/power-delivery
Request:
{
"session_id": "iso15118_veh_001_1738758000",
"power_schedule": {
"target_voltage_v": 400,
"target_current_a": 125,
"target_power_kw": 50
}
}
Response:
{
"status": "delivering",
"session_id": "iso15118_veh_001_1738758000",
"power_kw": 50,
"voltage_v": 400,
"current_a": 125
}
Charging Status
Get real-time charging status including SoC, power, and energy delivered.
Endpoint: POST /api/v1/iso15118/charging-status
Request:
{
"session_id": "iso15118_veh_001_1738758000"
}
Response:
{
"session_id": "iso15118_veh_001_1738758000",
"status": "active",
"current_soc": 72.5,
"target_soc": 80.0,
"energy_delivered_kwh": 5.25,
"current_power_kw": 50,
"estimated_time_remaining_min": 9
}
OCPP 2.0.1 WebSocket
Connection
Connect to the OCPP gateway via WebSocket:
wss://api.rollyy.com/ocpp/2.0.1?chargePointId={id}
Query Parameters:
chargePointId(required) - Unique identifier for the charge point
Message Format
OCPP messages follow the standard JSON array format:
[MessageType, MessageId, Action, Payload]
Message Types:
2- CALL (request)3- CALLRESULT (response)4- CALLERROR (error)
BootNotification
Notify the system that a charge point is online.
Request:
[2, "msg_001", "BootNotification", {
"chargingStation": {
"model": "RollyyBot",
"vendorName": "Rollyy",
"serialNumber": "RB-001"
},
"reason": "PowerUp"
}]
Response:
[3, "msg_001", {
"currentTime": "2026-02-05T12:00:00Z",
"interval": 300,
"status": "Accepted"
}]
Authorize
Authorize an ID token for charging.
Request:
[2, "msg_002", "Authorize", {
"idToken": {
"idToken": "RFID123",
"type": "ISO14443"
}
}]
Response:
[3, "msg_002", {
"idTokenInfo": {
"status": "Accepted"
}
}]
TransactionEvent
Report transaction events (start, update, end).
Request (Started):
[2, "msg_003", "TransactionEvent", {
"eventType": "Started",
"timestamp": "2026-02-05T12:00:00Z",
"transactionInfo": {
"transactionId": "txn_001"
},
"idToken": {
"idToken": "RFID123",
"type": "ISO14443"
},
"meterValue": [{
"timestamp": "2026-02-05T12:00:00Z",
"sampledValue": [{
"value": 0,
"measurand": "Energy.Active.Import.Register"
}]
}]
}]
Response:
[3, "msg_003", {
"totalCost": 0.0
}]
StatusNotification
Report charge point status changes.
Request:
[2, "msg_004", "StatusNotification", {
"timestamp": "2026-02-05T12:00:00Z",
"connectorStatus": "Available",
"evseId": 1,
"connectorId": 1
}]
Response:
[3, "msg_004", {}]
Heartbeat
Send periodic heartbeat to maintain connection.
Request:
[2, "msg_005", "Heartbeat", {}]
Response:
[3, "msg_005", {
"currentTime": "2026-02-05T12:00:00Z"
}]
MeterValues
Report real-time energy consumption and power measurements.
Request:
[2, "msg_006", "MeterValues", {
"evseId": 1,
"meterValue": [{
"timestamp": "2026-02-05T12:05:00Z",
"sampledValue": [
{
"value": 5.25,
"measurand": "Energy.Active.Import.Register",
"unitOfMeasure": {"unit": "kWh"}
},
{
"value": 50.0,
"measurand": "Power.Active.Import",
"unitOfMeasure": {"unit": "kW"}
},
{
"value": 400,
"measurand": "Voltage",
"unitOfMeasure": {"unit": "V"}
},
{
"value": 125,
"measurand": "Current.Import",
"unitOfMeasure": {"unit": "A"}
}
]
}]
}]
Response:
[3, "msg_006", {}]
Supported Measurands:
Energy.Active.Import.Register- Total energy delivered (kWh)Power.Active.Import- Current power (kW)Voltage- Voltage (V)Current.Import- Current (A)SoC- State of Charge (%)Temperature- Temperature (°C)
Tesla Fleet API
Wake Vehicle
Wake up a Tesla vehicle from sleep mode.
Endpoint: POST /api/v1/tesla/wake
Request:
{
"vehicle_id": "1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"status": "success",
"state": "online",
"timestamp": 1738758000
}
Open Charge Port
Open the Tesla charge port door.
Endpoint: POST /api/v1/tesla/charge-port-open
Request:
{
"vehicle_id": "1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"status": "success",
"timestamp": 1738758000
}
Start Charging
Start charging a Tesla vehicle.
Endpoint: POST /api/v1/tesla/charge-start
Request:
{
"vehicle_id": "1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"status": "success",
"command": "charge_start"
}
Stop Charging
Stop charging a Tesla vehicle.
Endpoint: POST /api/v1/tesla/charge-stop
Request:
{
"vehicle_id": "1234567890",
"access_token": "YOUR_ACCESS_TOKEN"
}
Response:
{
"status": "success",
"command": "charge_stop"
}
Get Charge State
Get battery and charging status.
Endpoint: GET /api/v1/tesla/charge-state
Query Parameters:
vehicle_id- Tesla vehicle IDaccess_token- OAuth access token
Response:
{
"soc_percent": 75,
"range_km": 420,
"charging_status": "CHARGING",
"charge_limit_soc": 80,
"charging_power_kw": 11,
"time_to_full_charge": 2.5
}
Get Vehicle Location
Get current vehicle GPS location.
Endpoint: GET /api/v1/tesla/location
Query Parameters:
vehicle_id- Tesla vehicle IDaccess_token- OAuth access token
Response:
{
"latitude": 37.4219999,
"longitude": -122.0840575,
"heading": 180,
"speed": 0
}
Set Charge Limit
Set the charge limit (50-100%).
Endpoint: POST /api/v1/tesla/set-charge-limit
Request:
{
"vehicle_id": "1234567890",
"access_token": "YOUR_ACCESS_TOKEN",
"percent": 80
}
Response:
{
"status": "success",
"charge_limit": 80
}
Set Charging Amps
Set charging current (5-32A).
Endpoint: POST /api/v1/tesla/set-charging-amps
Request:
{
"vehicle_id": "1234567890",
"access_token": "YOUR_ACCESS_TOKEN",
"charging_amps": 16
}
Response:
{
"status": "success",
"charging_amps": 16
}
Get Vehicle Data
Get complete vehicle data including all subsystems.
Endpoint: GET /api/v1/tesla/vehicle-data
Query Parameters:
vehicle_id- Tesla vehicle IDaccess_token- OAuth access token
Response: Returns complete Tesla API vehicle data object.
OAuth Callback
Handle OAuth 2.0 callback from Tesla authorization.
Endpoint: GET /oauth/tesla/callback
Query Parameters:
code- Authorization code from Teslastate- State parameter for CSRF protection
Response: Redirects to https://app.rollyy.com/settings/integrations/tesla?status=success
DIN 70121 Protocol
Legacy DC charging protocol used primarily in Europe before CCS.
Start Charging
Initiate DIN 70121 DC charging session.
Endpoint: POST /api/v1/din70121/start-charging
Request:
{
"vehicle_id": "veh_001",
"max_voltage": 400,
"max_current": 125
}
Parameters:
max_voltage: 0-600Vmax_current: 0-400A
Response:
{
"status": "charging_started",
"session_id": "din_veh_001",
"max_power_kw": 50.0
}
Stop Charging
Stop DIN 70121 charging session.
Endpoint: POST /api/v1/din70121/stop-charging
Request:
{
"vehicle_id": "veh_001"
}
Response:
{
"status": "stopped",
"vehicle_id": "veh_001"
}
Get Status
Get current DIN 70121 charging status.
Endpoint: GET /api/v1/din70121/status
Query Parameters:
vehicle_id- Vehicle identifier
Response:
{
"status": "charging",
"voltage": 400.0,
"current": 100.0,
"soc_percent": 60
}
CHAdeMO Protocol
Japanese DC fast charging standard supporting up to 400kW.
Start Charging
Start CHAdeMO DC fast charging.
Endpoint: POST /api/v1/chademo/start-charging
Request:
{
"vehicle_id": "veh_001",
"max_voltage": 500,
"max_current": 125,
"target_soc": 80
}
Parameters:
max_voltage: 0-1500V (CHAdeMO 3.0 supports up to 1500V)max_current: 0-600Atarget_soc: Optional, 0-100%
Response:
{
"status": "charging_started",
"session_id": "chademo_veh_001",
"max_power_kw": 62.5
}
Stop Charging
Stop CHAdeMO charging session.
Endpoint: POST /api/v1/chademo/stop-charging
Request:
{
"vehicle_id": "veh_001"
}
Response:
{
"status": "stopped",
"vehicle_id": "veh_001"
}
Get Status
Get CHAdeMO charging status.
Endpoint: GET /api/v1/chademo/status
Query Parameters:
vehicle_id- Vehicle identifier
Response:
{
"status": "charging",
"voltage": 400.0,
"current": 125.0,
"soc_percent": 65
}
CAN Bus Handshake
Perform CHAdeMO CAN bus handshake.
Endpoint: POST /api/v1/chademo/handshake
Request:
{
"vehicle_id": "veh_001"
}
Response:
{
"status": "connected",
"protocol": "CHAdeMO 1.2",
"can_ids": ["0x100", "0x101", "0x102"]
}
CCS (Combined Charging System)
European and North American DC fast charging standard supporting up to 350kW.
Start Charging
Start CCS DC fast charging.
Endpoint: POST /api/v1/ccs/start-charging
Request:
{
"vehicle_id": "veh_001",
"max_voltage": 800,
"max_current": 200,
"target_soc": 80
}
Parameters:
max_voltage: 0-1000Vmax_current: 0-500Atarget_soc: Optional, 0-100%
Response:
{
"status": "charging_started",
"session_id": "ccs_veh_001",
"max_power_kw": 160.0
}
Stop Charging
Stop CCS charging session.
Endpoint: POST /api/v1/ccs/stop-charging
Request:
{
"vehicle_id": "veh_001"
}
Response:
{
"status": "stopped",
"vehicle_id": "veh_001"
}
Get Status
Get CCS charging status.
Endpoint: GET /api/v1/ccs/status
Query Parameters:
vehicle_id- Vehicle identifier
Response:
{
"status": "charging",
"voltage": 800.0,
"current": 200.0,
"soc_percent": 70
}
Plug & Charge
CCS Plug & Charge authentication using vehicle certificate.
Endpoint: POST /api/v1/ccs/plug-and-charge
Request:
{
"vehicle_id": "veh_001",
"certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
}
Response:
{
"status": "authenticated",
"vehicle_id": "veh_001",
"payment_method": "plug_and_charge"
}
Tesla Fleet API
OAuth Callback
Handle OAuth 2.0 callback from Tesla authorization.
Endpoint: GET /oauth/tesla/callback
Query Parameters:
code- Authorization code from Teslastate- State parameter for CSRF protection
Response: Redirects to https://app.rollyy.com/settings/integrations/tesla?status=success
ChaoJi Protocol
Next-generation ultra-fast charging standard (China/Japan collaboration, up to 900kW).
Handshake
Endpoint: POST /api/v1/chaoji/handshake
Request:
{
"vehicle_id": "CHAOJI123456",
"charger_id": "CHARGER001",
"max_power_kw": 600.0,
"battery_capacity_kwh": 100.0
}
Response:
{
"status": "success",
"session_id": "chaoji_CHAOJI123456_CHARGER001",
"protocol_version": "ChaoJi 1.0",
"max_power_kw": 600.0,
"bidirectional": true,
"ready": true
}
Start Charging
Endpoint: POST /api/v1/chaoji/start-charging
Request:
{
"session_id": "chaoji_CHAOJI123456_CHARGER001",
"target_power_kw": 350.0,
"soc_target": 80
}
GB/T 27930 Protocol
Chinese DC fast charging standard.
Handshake
Endpoint: POST /api/v1/gbt27930/handshake
Request:
{
"vehicle_id": "GBT123456",
"charger_id": "CHARGER001",
"max_voltage": 750.0,
"max_current": 250.0
}
Response:
{
"status": "success",
"session_id": "gbt_GBT123456_CHARGER001",
"protocol_version": "GB/T 27930-2015",
"max_voltage": 750.0,
"max_current": 250.0,
"ready": true
}
IEEE 2030.5 (V2G)
Vehicle-to-Grid Smart Energy Profile for bidirectional charging.
Register Vehicle
Endpoint: POST /api/v1/ieee2030/register
Request:
{
"vehicle_id": "V2G123456",
"battery_capacity_kwh": 75.0,
"max_discharge_power_kw": 10.0,
"min_soc_percent": 20
}
Response:
{
"status": "registered",
"session_id": "v2g_V2G123456",
"battery_capacity_kwh": 75.0,
"max_discharge_power_kw": 10.0,
"grid_ready": true
}
Discharge to Grid
Endpoint: POST /api/v1/ieee2030/discharge
Request:
{
"session_id": "v2g_V2G123456",
"power_kw": 10.0,
"duration_min": 60,
"price_per_kwh": 0.22
}
Response:
{
"status": "discharging",
"power_kw": 10.0,
"duration_min": 60,
"energy_kwh": 10.0,
"revenue_usd": 2.20
}
Get Grid Demand
Endpoint: GET /api/v1/ieee2030/grid-demand
Response:
{
"demand_level": "high",
"price_per_kwh": 0.22,
"recommended_discharge_kw": 10.0,
"duration_min": 60,
"forecast": [
{"time": "17:00", "demand": "high", "price": 0.22},
{"time": "18:00", "demand": "peak", "price": 0.35}
]
}
OpenADR (Demand Response)
Automated Demand Response for grid integration and load management.
Enroll VEN
Endpoint: POST /api/v1/openadr/enroll
Request:
{
"ven_id": "VEN123456",
"resource_id": "RESOURCE001",
"max_power_kw": 50.0
}
Response:
{
"status": "enrolled",
"ven_id": "VEN123456",
"vtn_id": "grid_operator_001",
"resource_id": "RESOURCE001",
"max_power_kw": 50.0,
"enrolled_at": "2026-02-07T16:30:00Z"
}
Get DR Events
Endpoint: GET /api/v1/openadr/events/{ven_id}
Response:
{
"ven_id": "VEN123456",
"events": [
{
"event_id": "dr_event_001",
"signal_type": "LOAD_DISPATCH",
"signal_value": -5.0,
"start_time": "2026-02-07T18:00:00Z",
"duration_min": 120,
"priority": "high",
"incentive_usd": 15.00
}
]
}
Respond to Event
Endpoint: POST /api/v1/openadr/respond?event_id=dr_event_001&opt_status=optIn
FMS (Fleet Management System)
Fleet management standard for commercial EV operations.
Get Fleet Status
Endpoint: GET /api/v1/fms/fleet/{fleet_id}
Response:
{
"fleet_id": "FLEET001",
"total_vehicles": 25,
"available": 18,
"charging": 5,
"in_use": 2,
"avg_soc_percent": 72.5,
"total_range_km": 4250
}
Get Fleet Vehicles
Endpoint: GET /api/v1/fms/fleet/{fleet_id}/vehicles
Response:
{
"fleet_id": "FLEET001",
"vehicles": [
{
"vehicle_id": "EV001",
"driver_id": null,
"location": {"lat": 40.7128, "lng": -74.0060},
"soc_percent": 85.0,
"range_km": 340,
"status": "available"
}
]
}
Assign Trip
Endpoint: POST /api/v1/fms/trip/assign
Request:
{
"vehicle_id": "EV001",
"driver_id": "DRV123",
"destination": {"lat": 40.7580, "lng": -73.9855},
"scheduled_time": "2026-02-07T18:00:00Z"
}
Get Fleet Analytics
Endpoint: GET /api/v1/fms/analytics/{fleet_id}
Response:
{
"fleet_id": "FLEET001",
"period": "last_30_days",
"total_trips": 1250,
"total_distance_km": 45000,
"total_energy_kwh": 9000,
"avg_efficiency_kwh_per_100km": 20.0,
"charging_cost_usd": 1350.00,
"utilization_percent": 68.5
}
OCPI (Open Charge Point Interface)
Roaming protocol for cross-network charging access.
Get Versions
Endpoint: GET /api/v1/ocpi/versions
Response:
{
"status_code": 1000,
"status_message": "Success",
"data": [
{
"version": "2.2.1",
"url": "https://api.example.com/ocpi/2.2.1"
}
]
}
Get Locations
Endpoint: GET /api/v1/ocpi/2.2.1/locations
Headers: Authorization: Token YOUR_TOKEN
Response:
{
"status_code": 1000,
"data": [
{
"id": "LOC001",
"type": "ON_STREET",
"name": "Downtown Charging Hub",
"address": "123 Main St",
"city": "New York",
"coordinates": {"latitude": "40.7128", "longitude": "-74.0060"},
"evses": [
{
"uid": "EVSE001",
"status": "AVAILABLE",
"connectors": [
{
"id": "1",
"standard": "IEC_62196_T2",
"max_electric_power": 22000
}
]
}
]
}
]
}
Start Session
Endpoint: POST /api/v1/ocpi/2.2.1/sessions
Request:
{
"country_code": "US",
"party_id": "ABC",
"id": "SESSION001",
"start_datetime": "2026-02-07T16:30:00Z",
"kwh": 0.0,
"auth_id": "AUTH123",
"location_id": "LOC001",
"evse_uid": "EVSE001"
}
Get Tariffs
Endpoint: GET /api/v1/ocpi/2.2.1/tariffs
Response:
{
"status_code": 1000,
"data": [
{
"id": "TARIFF001",
"currency": "USD",
"elements": [
{
"price_components": [
{"type": "ENERGY", "price": 0.25, "step_size": 1},
{"type": "TIME", "price": 0.10, "step_size": 60}
]
}
]
}
]
}
Error Responses
All endpoints return errors in this format:
{
"error": "Error description",
"code": "ERROR_CODE",
"details": {}
}
Common Error Codes
| Code | Description |
|---|---|
INVALID_VEHICLE_ID | Vehicle not found or invalid |
SESSION_NOT_FOUND | Charging session doesn't exist |
AUTHENTICATION_FAILED | Invalid credentials or token |
CHARGE_PORT_LOCKED | Unable to unlock charge port |
BATTERY_STATUS_UNAVAILABLE | Cannot retrieve battery data |
INVALID_PARAMETERS | Missing or invalid request parameters |
RATE_LIMIT_EXCEEDED | Too many requests |
HTTP Status Codes
| Status | Description |
|---|---|
200 | Success |
201 | Created (session started) |
400 | Bad Request |
401 | Unauthorized |
404 | Not Found |
429 | Too Many Requests |
500 | Internal Server Error |