Hub roles: Tokens SENDER (CPO calls Hub authorize; Hub forwards to eMSP) and RECEIVER (Hub pushes whitelist Tokens to CPO). For charger-initiated RFID/Autocharge, call Hub authorize as CPO.
Guide: RFID & Autocharge.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /ocpi/2.2.1/tokens/{token_uid}/authorize?type={type} | Authorize with eMSP (OCPI-To required = token-owning eMSP) |
| (receive) | Hub → CPO PUT/PATCH .../tokens/{emsp_cc}/{emsp_pid}/{uid} | Receive whitelist Token push |
GET | /ocpi/2.2.1/tokens | Pull Tokens for routed eMSPs |
GET | /ocpi/2.2.1/tokens/{emsp_cc}/{emsp_pid}/{token_uid} | Get one Token |
Charger-initiated RFID / Autocharge
Map OCPP idTag (or Autocharge MAC/EVCCID) to OCPI token.uid, then:
CPO → Hub: POST /ocpi/2.2.1/tokens/{uid}/authorize?type=RFID
Headers: OCPI-to-country-code / OCPI-to-party-id = eMSP
Body: optional LocationReferences
Hub → eMSP: POST {tokens_sender_url}/{uid}/authorize?type=RFID
type defaults to RFID when omitted. Hub returns full AuthorizationInfo. On session/CDR push use:
auth_method: AUTH_REQUESTafter realtime authorizeauth_method: WHITELISTafter local whitelist auth- Prefer real eMSP identity on
cdr_token(not HubCIH)
Conventions
| Mode | token.type / query type | uid |
|---|---|---|
| RFID | RFID | Card UID |
| Autocharge | OTHER | Normalized MAC / EVCCID |
Whitelist receive / pull
eMSP pushes Tokens through Hub; Hub forwards PUT/PATCH to your Tokens RECEIVER. You may also GET Tokens from Hub (filtered by routing).
Set whitelist: ALWAYS or ALLOWED_OFFLINE for offline Autocharge.
Rate limit
100 requests/minute per party (shared Hub limit on the authorization path).
Related docs
OCPI spec
See OCPI 2.2.1 Tokens module (Sender interface POST …/authorize) for full authorization request/response objects.