- EMSP Version 2.0 APIs
- REST APIs
- POST Register Charge Point Operator -
/ocpi/cpo/2.2/register
- POST Upload CPO Logo -
/ocpi/cpo/2.2/cpo/upload
- POST Login API -
/ocpi/cpo/api/auth/v1/login
- POST Upload Location Photos -
/ocpi/cpo/api/v1/locations/photos/uploads
- PATCH Update Location Photo by ID -
/ocpi/cpo/api/v1/locations/photos/uploads/:photo_id
- GET Refresh Token API -
/ocpi/cpo/api/auth/v1/refresh
- POST Logout API -
/ocpi/cpo/api/auth/v1/logout
- POST Change Old Password API -
/ocpi/cpo/api/auth/v1/change-old-password
- POST Register Locations through CSV -
/ocpi/cpo/api/v2/locations/uploads/csv
- GET Default Filters -
/ocpi/cpo/2.2/filters
- GET List of Cities by Province -
/ocpi/cpo/2.2/filters/cities/:province_name
- GET Charging Point Operator (CPO) Details -
/ocpi/cpo/2.2/details
- PATCH Update CPO Logo by CPO Owner ID -
/ocpi/cpo/2.2/cpo/logo/upload
- GET Pending Locations and EVSEs -
/ocpi/cpo/2.2/locations/pending
- POST Register Charge Point Operator -
- GraphQL APIs
- Webhooks
- REST APIs
Description
Registers Charge Point Operator.
Authorization: Basic TOKEN
Request Body
{
"username": "solarius", // required
"cpo_owner_name": "Solarius", // required
"contact_name": "Solarius CEO", // required
"contact_number": "09123456782", // required
"contact_email": "[email protected]", // required
"ocpp_ready": true, // required
"logo": "cpo-logo.png" // optional
}
Response
{
"status": 200,
"data": "SUCCESS",
"message": "Success"
}
Errors
- HttpBadRequest
- HttpInternalServerError
Authorization: Basic TOKEN
Request Form Data
- Key: cpo_logo
- Type: File
Response
{
"status": 200,
"data": [],
"message": "Success"
}
Authorization: Basic TOKEN
Request Body
{
"username": "username",
"password": "password"
}
Response
{
"status": 200,
"data": {
"access_token": "access_token",
"access_expires_in": 1719814489,
"refresh_token": "refresh_token",
"refresh_expires_in": 1722405589,
"role": "CPO_OWNER"
},
"message": "SUCCESS"
}
Errors
- Unauthorized
- Bad Request
- Internal Server Error
Authorization: Bearer TOKEN
Request Body
-
location_photos -> Location photos to upload. This API only accepts maximum of five (5) files.
-
location_id -> Location ID
Response
{
"status": 200,
"data": [],
"message": "Success"
}
Authorization: Bearer TOKEN
Request Body
- location_photo -> Location photo to upload as an update to the photo specified by ID
Response
{
"status": 200,
"data": [],
"message": "Success"
}
Authorization: Bearer REFRESH_TOKEN
Response
{
"status": 200,
"data": {
"access_token": "access_token",
"access_expires_in": 1719814489,
"refresh_token": "refresh_token",
"refresh_expires_in": 1722405589,
"role": "CPO_OWNER"
},
"message": "SUCCESS"
}
Errors
- Forbidden
- Unauthorized
- Internal Server Error
Authorization: Bearer ACCESS_TOKEN
Response
{
"status": 200,
"data": [],
"message": "Logged out successfully"
}
Errors
- Unauthorized
- Internal Server Error
Authorization: Bearer ACCESS_TOKEN
Response
{
"status": 200,
"data": "SUCCESS",
"message": "Success"
}
Errors
- Unauthorized
- Internal Server Error
- Bad Request
Authorization: Bearer ACCESS_TOKEN
Request Body (Form Data)
Key: file Valid File: .csv
Response
{
"status": 200,
"data": [],
"message": "Success"
}
Authorization: Basic BASIC_TOKEN
Response
{
"status": 200,
"data": {
"connector_types": [
{
"id": 1,
"code": "TYPE_1",
"description": "Type 1"
},
{
"id": 2,
"code": "TYPE_2",
"description": "Type 2"
},
{
"id": 3,
"code": "CHADEMO",
"description": "CHADEMO"
},
{
"id": 4,
"code": "GBT",
"description": "GBT"
}
]
// Other default filters
},
"message": "Success"
}
Authorization: Basic BASIC_TOKEN
Parameters
province_name
- Example: 'Zambales'
Response
{
"status": 200,
"data": [
{
"city": "Olongapo"
}
],
"message": "Success"
}
Authorization: Bearer TOKEN
Response
{
"status": 200,
"data": {
"party_id": "EVCompany",
"cpo_owner_name": "EVC",
"contact_name": "Contact Name",
"contact_number": "09341123312",
"contact_email": "[email protected]",
"logo": "logo.png"
},
"message": "Success"
}
Authorization: Bearer TOKEN
Request Body
{
"logo": "filename.png"
}
Response
{
"status": 200,
"data": [],
"message": "Success"
}
Authorization: Bearer TOKEN
Response
{
"status": 200,
"data": [
{
"pending_locations": 1,
"pending_evses": 2
}
],
"message": "Success"
}
NOTE: When there are no pending locations and evses. The response would be:
{
"status": 200,
"data": "NO_PENDING_LOCATIONS_AND_EVSES",
"message": "Success"
}
query Evse {
evse(location_name: "Fi", order_by: "location", order: "DESC") {
uid
evse_id
serial_number
meter_type
status
cpo_location_id
current_ws_connection_id
server_id
date_created
capabilities {
id
code
description
}
payment_types {
id
code
description
}
connectors {
id
evse_uid
connector_id
standard
format
power_type
max_voltage
max_amperage
max_electric_power
connector_type
rate_setting
status
date_created
date_modified
}
locations {
id
cpo_owner_id
name
address
address_lat
address_lng
city
region
postal_code
country_code
images
publish
date_created
date_modified
facilities {
id
code
description
}
parking_restrictions {
id
code
description
}
parking_types {
id
code
description
}
}
}
}
Authorization: Bearer TOKEN
Arguments
- location_name -> Location Name (Optional)
- order_by -> Field to sort. Valid values are 'location', and 'date_created'
- order -> Sorting order. Valid values are ASC, and DESC
- limit -> Number of EVSEs to return
- offset -> Starting EVSE to return
Response
- List of EVSEs
query Locations {
locations(limit: 10, offset: 0) {
id
cpo_owner_id
name
address
address_lat
address_lng
city
region
postal_code
country_code
images
publish
date_created
date_modified
evses {
uid
evse_id
serial_number
meter_type
status
cpo_location_id
current_ws_connection_id
server_id
date_created
connectors {
id
evse_uid
connector_id
standard
format
power_type
max_voltage
max_amperage
max_electric_power
connector_type
rate_setting
status
date_created
date_modified
}
capabilities {
id
code
description
}
payment_types {
id
code
description
}
}
facilities {
id
code
description
}
parking_restrictions {
id
code
description
}
parking_types {
id
code
description
}
}
}
Authorization: Bearer TOKEN
Arguments
- limit -> Number of Locations to return
- offset -> Starting Location to return
Response
- List of Locations
query Find_ev_locations {
find_ev_locations {
id
cpo_owner_id
name
address
address_lat
address_lng
distance
city
region
postal_code
country_code
images
publish
date_created
date_modified
evses {
uid
evse_id
serial_number
meter_type
status
cpo_location_id
current_ws_connection_id
server_id
date_created
capabilities {
id
code
description
}
payment_types {
id
code
description
}
connectors {
id
evse_uid
connector_id
standard
format
power_type
max_voltage
max_amperage
max_electric_power
connector_type
rate_setting
status
date_created
date_modified
}
}
facilities {
id
code
description
}
parking_restrictions {
id
code
description
}
parking_types {
id
code
description
}
}
}
Authorization: Basic BASIC_TOKEN
Response
- List of FindEV Locations
query Find_ev_filter_locations {
find_ev_filter_locations(lat: 14.559192, lng: 121.017516) {
id
cpo_owner_id
name
address
distance
address_lat
address_lng
city
province
region
postal_code
country_code
images
publish
date_created
date_modified
evses {
uid
evse_id
serial_number
meter_type
status
cpo_location_id
current_ws_connection_id
server_id
date_created
connectors {
id
evse_uid
connector_id
standard
format
power_type
max_voltage
max_amperage
max_electric_power
connector_type
rate_setting
status
date_created
date_modified
}
capabilities {
id
code
description
}
payment_types {
id
code
description
}
}
facilities {
id
code
description
}
parking_restrictions {
id
code
description
}
parking_types {
id
code
description
}
}
}
Authorization: Basic BASIC_TOKEN
Arguments
- lat
- Decimal format for location's latitude
- Ex: 14.123451
- lng
- Decimal format for location's longitude
- Ex: 121.123451
- distance
- Maximum radius of location to filter
- Ex: 10
- city
- Location's city to filter
- Ex: 'Cabuyao'
- province
- Location's province to filter
- Ex: 'Laguna'
- facilities
- Example input: ["CAFE","WIFI"]
- VALID VALUES:
- BANKS/ATM
- CAFE
- CINEMA
- DRUGSTORE
- GAS_STATION
- GROCERIES
- HARDWARE_SHOPS
- HOTEL
- MALL
- PARKING_LOT
- POOL
- RESTAURANTS
- RESTROOM
- SHOPS
- WATER_SPORTS
- WIFI
- capabilities
- Example input: ["QR_READER","CREDIT_DEBIT_PAYABLE"]
- VALID VALUES:
- CREDIT_DEBIT_PAYABLE
- QR_READER
- PRIVILEGE_AND_LOYALTY
- payment_types
- Example input: ["GCASH","MAYA"]
- VALID VALUES:
- GCASH
- MAYA
- parking_types
- Example input: ["INDOOR","OUTDOOR"]
- VALID VALUES:
- INDOOR
- OUTDOOR
Response
- List of filtered locations
query Location {
location(id: 755) {
id
cpo_owner_id
name
address
distance
address_lat
address_lng
city
province
region
postal_code
country_code
images
publish
date_created
date_modified
evses {
uid
evse_id
serial_number
meter_type
status
cpo_location_id
current_ws_connection_id
server_id
date_created
connectors {
id
evse_uid
connector_id
standard
format
power_type
max_voltage
max_amperage
max_electric_power
connector_type
rate_setting
status
date_created
date_modified
}
capabilities {
id
code
description
}
payment_types {
id
code
description
}
}
facilities {
id
code
description
}
parking_restrictions {
id
code
description
}
parking_types {
id
code
description
}
}
}
Authorization: Bearer TOKEN
Arguments
- id
- Location's ID
Response
- Single Location Object
Authorization: Bearer CPO_TOKEN_C
Parameters
- country_code: Location's country code.
- party_id: Location's associated party ID.
Requst Body
{
"locations": [
{
"name": "Yan-Yan's Store",
"address": "BLK 137 LOT 3, Phase 2, Cabuyao, Laguna",
"lat": "14.12345",
"lng": "121.12345",
"evses": [
{
"uid": "123456689",
"status": "AVAILABLE",
"meter_type": "AC",
"kwh": 7,
"connectors": [
{
"standard": "CHADEMO",
"format": "SOCKET",
"power_type": "AC",
"max_voltage": 230,
"max_amperage": 16,
"max_electric_power": 120
}
],
"capabilities": ["CREDIT_DEBIT_PAYABLE", "QR_READER"],
"payment_types": ["GCASH", "MAYA"]
},
{
"uid": "123",
"status": "AVAILABLE",
"meter_type": "AC",
"kwh": 7,
"connectors": [
{
"standard": "TYPE_2",
"format": "SOCKET",
"power_type": "AC",
"max_voltage": 230,
"max_amperage": 16,
"max_electric_power": 120
}
],
"capabilities": ["CREDIT_DEBIT_PAYABLE", "QR_READER"],
"payment_types": ["GCASH", "MAYA"]
}
],
"facilities": ["CINEMA", "CAFE"],
"parking_types": ["INDOOR"],
"parking_restrictions": ["CUSTOMERS", "DISABLED"]
}
]
}
Response
{
"status": 200,
"data": [
{
"location_id": 754
}
], // list of location id
"message": "Success"
}
Authorization: Bearer CPO_TOKEN_C
Parameters
- country_code: Location's country code.
- party_id: Location's associated party ID.
Request Body
{
"location_id": 176,
"uid": "123456689",
"status": "AVAILABLE",
"meter_type": "AC",
"kwh": 7,
"connectors": [
{
"standard": "CHADEMO",
"format": "SOCKET",
"power_type": "AC",
"max_voltage": 230,
"max_amperage": 16,
"max_electric_power": 120
}
],
"capabilities": ["CREDIT_DEBIT_PAYABLE", "QR_READER"],
"payment_types": ["GCASH", "MAYA"]
}
Response
{
"status": 200,
"data": "SUCCESS",
"message": "Success"
}