For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
DocsAPI Reference
DocsAPI Reference
  • Docs
    • Welcome
    • Quickstart
    • Concepts
    • Common workflows
  • SDKs
    • Python
    • TypeScript
  • Authentication
    • Overview
  • Reference
    • API reference
    • Support
Dashboard
LogoLogo
Docs

Quickstart

Create a location, deploy a charger, and send your first OCPP command in 5 steps
||View as Markdown|
Was this page helpful?
Edit this page
Previous

OCPPLAB Gateway

Next

Concepts

Built with

Follow this guide to make your first successful requests against the OCPPLAB Gateway API.

1

Set your API host and token

Create a user token from the OCPPLAB dashboard and export it alongside your API host:

$export BASE_URL="https://<your-api-host>"
$export ACCESS_TOKEN="<jwt>"

Confirm the API is reachable before you go further:

$curl "$BASE_URL/health"

You should see a 200 with a small JSON body. If not, stop here and fix connectivity before anything else. The Authorization: Bearer $ACCESS_TOKEN header is all a user token needs. See Authentication for the admin case.

2

Install an SDK

OCPPLAB ships SDKs for Python and Node.js. Pick one — or skip to shell if you prefer raw HTTP.

$pip install ocpplab

Initialize the client:

1import os
2from ocpplab import OcpplabSDK
3
4client = OcpplabSDK(
5 token=os.environ["ACCESS_TOKEN"],
6 base_url=os.environ["BASE_URL"],
7)
3

Explore the catalog

The catalog lists every charger brand and model the simulator supports. Pick one before you deploy a charger.

$curl "$BASE_URL/catalog/brands?page=1&limit=20" \
> -H "Authorization: Bearer $ACCESS_TOKEN"
$
$curl "$BASE_URL/catalog/brands/wallbox/models?page=1&limit=50" \
> -H "Authorization: Bearer $ACCESS_TOKEN"
4

Create a location

A location groups chargers under one physical site. Save the returned id — the next step uses it.

$curl -X POST "$BASE_URL/locations" \
> -H "Authorization: Bearer $ACCESS_TOKEN" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "La Defense Charging Hub",
> "address": "14 Rue de la Paix",
> "city": "Paris",
> "country": "FR",
> "coordinates": { "latitude": 48.8566, "longitude": 2.3522 },
> "timezone": "Europe/Paris",
> "owner_name": "VINCI Autoroutes",
> "public": true
> }'

Example response:

1{
2 "id": "4090477f-a416-4515-a302-97aa344a0a2a",
3 "slug": "paris-la-defense-hub-a1b2c3d4",
4 "name": "La Defense Charging Hub",
5 "status": "active"
6}
5

Deploy a charger

Bind a charger to the location from step 4, pick a model from the catalog, and point it at any CSMS WebSocket. Replace <LOCATION_ID> with the id returned in step 4.

$curl -X POST "$BASE_URL/chargers" \
> -H "Authorization: Bearer $ACCESS_TOKEN" \
> -H "Content-Type: application/json" \
> -d '{
> "identity": "CP-TEST-001",
> "brand_slug": "wallbox",
> "model_slug": "wallbox-pulsar-plus",
> "connector_type": "Type2",
> "ws_url": "wss://ocpp.ocpplab.com",
> "ocpp_version": "OCPP1.6",
> "charge_point_name": "Bay A01",
> "location_id": "<LOCATION_ID>",
> "location_name": "La Defense Charging Hub"
> }'
6

Send a command and inspect logs

Kick off a transaction on the charger, then read the OCPP traffic it produced.

$curl -X POST "$BASE_URL/chargers/$CHARGER_ID/start-transaction" \
> -H "Authorization: Bearer $ACCESS_TOKEN" \
> -H "Content-Type: application/json" \
> -d '{"id_tag": "TAG-RFID-001", "evse_id": 1, "connector_id": 1}'
$
$curl "$BASE_URL/chargers/$CHARGER_ID/logs?event=Authorize&limit=100&offset=0" \
> -H "Authorization: Bearer $ACCESS_TOKEN"

You now have a live charger replaying OCPP messages against your CSMS. Keep going:

Common workflows

Bulk-provision chargers, spin up CPO bundles, inject faults.

Concepts

How tenants, locations, chargers, and OCPI fit together.

API reference

Every endpoint with shell, Python, and Node samples.

Python SDK

Sync and async clients, retries, timeouts.