Skip to main content
OCPI (Open Charge Point Interface) is an open protocol that lets EV charging networks interoperate. By connecting Dynamo CSMS to an eMSP (e-Mobility Service Provider) via OCPI, drivers who subscribe to that eMSP can authenticate and charge at your stations — even without a Dynamo account. Dynamo CSMS acts as the CPO (Charge Point Operator) role in OCPI exchanges. This guide shows you how to register with an eMSP roaming partner and use the key data endpoints.
Dynamo CSMS supports OCPI 2.2.1. If your roaming partner only supports 2.1.1, contact Dynamo support to discuss compatibility options before proceeding.

How OCPI registration works

OCPI uses a credentials handshake to establish a trusted connection between two parties. The sequence is:
  1. Fetch the list of supported OCPI versions from your partner.
  2. Retrieve the version detail to discover module URLs.
  3. Exchange credentials tokens — your partner sends you a TOKEN_A, and after registration you receive a permanent TOKEN_C.
  4. Use TOKEN_C in all subsequent OCPI requests.
1

Discover OCPI versions

Check which OCPI versions Dynamo supports.
curl -X GET https://api.dynamo-csms.com/ocpi/versions \
  -H "Authorization: Token TOKEN_A_FROM_YOUR_EMSP_PARTNER"
Response:
{
  "data": [
    {
      "version": "2.2.1",
      "url": "https://api.dynamo-csms.com/ocpi/versions/2.2.1"
    }
  ],
  "status_code": 1000,
  "status_message": "Success",
  "timestamp": "2026-05-01T13:00:00Z"
}
2

Get version detail

Retrieve module endpoint URLs for OCPI 2.2.1.
curl -X GET https://api.dynamo-csms.com/ocpi/versions/2.2.1 \
  -H "Authorization: Token TOKEN_A_FROM_YOUR_EMSP_PARTNER"
Response:
{
  "data": {
    "version": "2.2.1",
    "endpoints": [
      { "identifier": "credentials", "role": "CPO", "url": "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/credentials" },
      { "identifier": "locations",   "role": "CPO", "url": "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/locations" },
      { "identifier": "sessions",    "role": "CPO", "url": "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/sessions" },
      { "identifier": "cdrs",        "role": "CPO", "url": "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/cdrs" },
      { "identifier": "tariffs",     "role": "CPO", "url": "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/tariffs" },
      { "identifier": "tokens",      "role": "CPO", "url": "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/tokens" },
      { "identifier": "commands",    "role": "CPO", "url": "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/commands" }
    ]
  },
  "status_code": 1000,
  "status_message": "Success",
  "timestamp": "2026-05-01T13:00:05Z"
}
3

Register credentials with the eMSP

Send your CPO credentials to your roaming partner. Include the token you want them to use for future requests to Dynamo (TOKEN_C), along with your business details and your own OCPI versions URL.
curl -X POST https://api.dynamo-csms.com/ocpi/cpo/2.2.1/credentials \
  -H "Authorization: Token TOKEN_A_FROM_YOUR_EMSP_PARTNER" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "TOKEN_C_YOU_GENERATE_FOR_EMSP",
    "url": "https://api.dynamo-csms.com/ocpi/versions",
    "roles": [
      {
        "role": "CPO",
        "business_details": {
          "name": "Dynamo CSMS",
          "website": "https://dynamo-csms.com",
          "logo": {
            "url": "https://dynamo-csms.com/logo.png",
            "category": "OPERATOR",
            "type": "png",
            "width": 512,
            "height": 512
          }
        },
        "party_id": "DYN",
        "country_code": "GB"
      }
    ]
  }'
Response:
{
  "data": {
    "token": "TOKEN_C_RETURNED_BY_EMSP",
    "url": "https://emsp-partner.example.com/ocpi/versions",
    "roles": [
      {
        "role": "EMSP",
        "party_id": "EMP",
        "country_code": "NL",
        "business_details": {
          "name": "Example eMSP NL"
        }
      }
    ]
  },
  "status_code": 1000,
  "status_message": "Success",
  "timestamp": "2026-05-01T13:01:00Z"
}
Store TOKEN_C_RETURNED_BY_EMSP — use it in the Authorization: Token header for all subsequent requests to this eMSP partner’s OCPI endpoints.
4

Verify your registration

Confirm the handshake succeeded by fetching your own credentials back.
curl -X GET https://api.dynamo-csms.com/ocpi/cpo/2.2.1/credentials \
  -H "Authorization: Token TOKEN_C_YOU_GENERATE_FOR_EMSP"
A status_code of 1000 confirms successful registration.

Locations

Expose your charging locations to the roaming partner so their drivers can discover and navigate to your chargers.
curl -X GET "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/locations?limit=10&offset=0" \
  -H "Authorization: Token TOKEN_C_YOU_GENERATE_FOR_EMSP"
Response:
{
  "data": [
    {
      "country_code": "GB",
      "party_id": "DYN",
      "id": "LOC001",
      "name": "Riverside Business Park",
      "address": "12 Riverside Way",
      "city": "Bristol",
      "postal_code": "BS1 4AA",
      "country": "GBR",
      "coordinates": {
        "latitude": "51.454500",
        "longitude": "-2.587900"
      },
      "evses": [
        {
          "uid": "EVSE001",
          "evse_id": "GB*DYN*E001*1",
          "status": "AVAILABLE",
          "connectors": [
            {
              "id": "1",
              "standard": "IEC_62196_T2",
              "format": "SOCKET",
              "power_type": "AC_3_PHASE",
              "max_voltage": 230,
              "max_amperage": 32,
              "max_electric_power": 22000
            }
          ]
        }
      ],
      "last_updated": "2026-05-01T09:00:00Z"
    }
  ],
  "status_code": 1000,
  "status_message": "Success",
  "timestamp": "2026-05-01T13:05:00Z"
}

Sessions

Retrieve active and completed sessions that originated via OCPI (i.e. from roaming drivers).
curl -X GET "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/sessions?date_from=2026-05-01T00:00:00Z&limit=25" \
  -H "Authorization: Token TOKEN_C_YOU_GENERATE_FOR_EMSP"
Response:
{
  "data": [
    {
      "country_code": "GB",
      "party_id": "DYN",
      "id": "ses_OCPI_01HX1234",
      "start_date_time": "2026-05-01T08:12:00Z",
      "end_date_time": "2026-05-01T09:04:00Z",
      "kwh": 14.7,
      "cdr_token": {
        "uid": "RFID_TOKEN_ABC123",
        "type": "RFID",
        "contract_id": "NLEMPCONTRACT001"
      },
      "auth_method": "WHITELIST",
      "location_id": "LOC001",
      "evse_uid": "EVSE001",
      "connector_id": "1",
      "currency": "GBP",
      "status": "COMPLETED",
      "last_updated": "2026-05-01T09:04:30Z"
    }
  ],
  "status_code": 1000,
  "status_message": "Success",
  "timestamp": "2026-05-01T13:06:00Z"
}

Charge Detail Records (CDRs)

CDRs are the billing records generated at the end of each completed session. The eMSP uses these to invoice their drivers.
curl -X GET "https://api.dynamo-csms.com/ocpi/cpo/2.2.1/cdrs?date_from=2026-05-01T00:00:00Z&limit=25" \
  -H "Authorization: Token TOKEN_C_YOU_GENERATE_FOR_EMSP"
Response:
{
  "data": [
    {
      "country_code": "GB",
      "party_id": "DYN",
      "id": "CDR_01HX5678",
      "start_date_time": "2026-05-01T08:12:00Z",
      "end_date_time": "2026-05-01T09:04:00Z",
      "session_id": "ses_OCPI_01HX1234",
      "cdr_token": {
        "uid": "RFID_TOKEN_ABC123",
        "type": "RFID",
        "contract_id": "NLEMPCONTRACT001"
      },
      "auth_method": "WHITELIST",
      "cdr_location": {
        "id": "LOC001",
        "name": "Riverside Business Park",
        "evse_uid": "EVSE001",
        "evse_id": "GB*DYN*E001*1",
        "connector_id": "1"
      },
      "currency": "GBP",
      "tariffs": [
        { "id": "TAR001", "currency": "GBP" }
      ],
      "charging_periods": [
        {
          "start_date_time": "2026-05-01T08:12:00Z",
          "dimensions": [
            { "type": "ENERGY", "volume": 14.7 }
          ]
        }
      ],
      "total_energy": 14.7,
      "total_cost": { "excl_vat": 6.17, "incl_vat": 7.40 },
      "last_updated": "2026-05-01T09:05:00Z"
    }
  ],
  "status_code": 1000,
  "status_message": "Success",
  "timestamp": "2026-05-01T13:07:00Z"
}

Tariffs

Publish your tariff information via OCPI so the eMSP can display pricing to drivers before they start charging.
curl -X GET https://api.dynamo-csms.com/ocpi/cpo/2.2.1/tariffs \
  -H "Authorization: Token TOKEN_C_YOU_GENERATE_FOR_EMSP"
Response:
{
  "data": [
    {
      "country_code": "GB",
      "party_id": "DYN",
      "id": "TAR001",
      "currency": "GBP",
      "elements": [
        {
          "price_components": [
            { "type": "ENERGY", "price": 0.42, "vat": 20.0, "step_size": 1 },
            { "type": "FLAT",   "price": 0.50, "vat": 20.0, "step_size": 1 }
          ]
        }
      ],
      "last_updated": "2026-05-01T10:00:00Z"
    }
  ],
  "status_code": 1000,
  "status_message": "Success",
  "timestamp": "2026-05-01T13:08:00Z"
}

Token management

Dynamo CSMS stores driver tokens (RFID cards, app tokens) shared by the eMSP. The eMSP pushes tokens to you so you can authorise drivers offline.
curl -X GET https://api.dynamo-csms.com/ocpi/cpo/2.2.1/tokens/NL/EMP/RFID_TOKEN_ABC123 \
  -H "Authorization: Token TOKEN_C_YOU_GENERATE_FOR_EMSP"

Deregister from a roaming partner

To terminate the OCPI connection with a partner, delete your credentials. This revokes the exchange tokens on both sides.
curl -X DELETE https://api.dynamo-csms.com/ocpi/cpo/2.2.1/credentials \
  -H "Authorization: Token TOKEN_C_YOU_GENERATE_FOR_EMSP"
Response:
{
  "status_code": 1000,
  "status_message": "Credentials deleted successfully",
  "timestamp": "2026-05-01T15:00:00Z"
}
Deleting credentials immediately invalidates the exchange tokens. Any roaming sessions in progress will continue until they end naturally, but no new sessions from that eMSP’s drivers will be authorised.