Skip to main content

Quickstart: Connect Your First CPO

Get your Charge Point Operator (CPO) integrated with Zynka ONE in under 30 minutes.

📝

This guide assumes you have an OCPI-compatible backend system ready.

Prerequisites

  • ✅ OCPI-compatible backend system
  • ✅ API credentials from Zynka ONE dashboard
  • ✅ Test environment access
  • ✅ Basic understanding of REST APIs

Step 1: Set Up Authentication

First, establish a secure connection by registering your credentials with Zynka ONE.

curl -X POST https://api.zynka.one/ocpi/2.2.1/credentials \
-H "Content-Type: application/json" \
-H "Authorization: Token YOUR_SANDBOX_TOKEN" \
-d '{
"token": "your-ocpi-token",
"url": "https://your-cpo.com/ocpi",
"party_id": "CPO001",
"country_code": "IN"
}'

Expected Response:

{
"status_code": 1000,
"status_message": "Credentials successfully registered",
"data": {
"token": "zynka-returned-token",
"url": "https://api.zynka.one/ocpi",
"party_id": "ZYNKA",
"country_code": "IN"
}
}

Step 2: Register Your Locations

Publish your charging locations so eMSPs can discover and use your chargers.

curl -X PUT https://api.zynka.one/ocpi/cpo/2.2.1/locations/LOC001 \
-H "Content-Type: application/json" \
-H "Authorization: Token your-ocpi-token" \
-d '{
"id": "LOC001",
"type": "ON_STREET",
"name": "Downtown Charging Hub",
"address": "123 Main Street",
"city": "Mumbai",
"postal_code": "400001",
"country": "IND",
"coordinates": {
"latitude": "19.0760",
"longitude": "72.8777"
},
"evses": [
{
"id": "EVSE001",
"status": "AVAILABLE",
"connectors": [
{
"id": "CONN001",
"type": "IEC_62196_T2",
"power_type": "AC_3_PHASE",
"max_voltage": 400,
"max_amperage": 32,
"max_electric_power": 22000
}
]
}
]
}'

Step 3: Configure Tariffs

Set up pricing for your charging sessions.

curl -X PUT https://api.zynka.one/ocpi/cpo/2.2.1/tariffs/TAR001 \
-H "Content-Type: application/json" \
-H "Authorization: Token your-ocpi-token" \
-d '{
"id": "TAR001",
"currency": "INR",
"elements": [
{
"price_components": [
{
"type": "ENERGY",
"price": 12.0,
"step_size": 1
},
{
"type": "TIME",
"price": 2.5,
"step_size": 1
}
]
}
],
"last_updated": "2024-01-15T10:00:00Z"
}'

Step 4: Test the Connection

Verify your integration by checking location availability.

curl -X GET https://api.zynka.one/ocpi/emsp/2.2.1/locations \
-H "Authorization: Token zynka-returned-token"
⚠️

Always test in sandbox environment before production deployment.

Step 5: Handle Sessions

Implement session lifecycle management for charging events.

# Start session
curl -X POST https://api.zynka.one/ocpi/emsp/2.2.1/commands/START_SESSION \
-H "Content-Type: application/json" \
-H "Authorization: Token zynka-returned-token" \
-d '{
"response_url": "https://your-cpo.com/ocpi/commands/callback",
"evse_id": "EVSE001",
"connector_id": "CONN001",
"token": {
"id": "TOKEN123",
"type": "RFID"
}
}'

Next Steps

🎉 Congratulations! Your CPO is now connected to Zynka ONE.

What to do next:

  1. Monitor Sessions: Set up webhooks to receive real-time session updates
  2. Handle Payments: Integrate UPI for seamless transactions
  3. Add More Locations: Scale your network by registering additional sites
  4. Configure Alerts: Set up monitoring for charger availability and failures

Useful Resources:

Enable session webhooks immediately to ensure real-time synchronization with eMSPs.