The API authenticates with a session cookie, so the examples use
curl -c to
save cookies and -b to send them back. A browser client gets this for free.1. Create an account
2. Open an organization
Everything else in the API is scoped to an organization, so this comes first. Each user owns at most one.state is a two-letter Brazilian state
code.
3. Register a station
Theidentifier is the only required field, and it matters more than it looks:
it is the identity the charger will use to connect over OCPP, so it has to match
what the hardware is configured with.
id, which the command endpoints take in
their path.
password is optional but recommended. Set it and the station must present it
as HTTP Basic auth to connect. Leave it out and any client claiming that
identifier is accepted. Latitude and longitude must be sent together or not at
all.4. Point the charger at the CSMS
This step happens on the hardware, in its own configuration screen, not through this API. Set the central system URL to:ocpp1.6 or ocpp2.0.1 as the WebSocket subprotocol, and if you set a
password, it authenticates with HTTP Basic where the username is the station
identifier and the password is the secret you chose.
Verify it arrived by searching your stations and reading the connection flag:
The station is not showing as connected
The station is not showing as connected
Three things account for almost every case. The identifier in the URL must
match the registered one exactly, including case. The subprotocol must be
offered by the charger, since a connection without one is rejected during the
handshake. And if the station has a password, the Basic auth username must be
the identifier itself, not an account name.
5. Drive it remotely
With the station online, the command endpoints translate straight into OCPP messages. Start a charge:6. Read what happened
The charge is recorded as a session as it runs, so you can watch it live and review it afterwards:Where to go next
API conventions
Errors, pagination, filtering and roles, explained once for every endpoint.
API Reference
Every endpoint with its request and response schema.