Endpoints
| Method | Path | Caller | Description |
|---|---|---|---|
PUT | /ocpi/2.2.1/tokens/{cc}/{pid}/{token_uid}/authorize | eMSP | Authorize token at CPO |
Hub role: RECEIVER (eMSP calls Hub; Hub forwards to CPO)
Flow
eMSP → Hub: PUT .../authorize Hub → CPO: PUT .../authorize (realtime) CPO → Hub: authorization result Hub → eMSP: authorization result
Request example
PUT /ocpi/2.2.1/tokens/IN/ABC/TOKEN001/authorize
Authorization: Token {emsp-token}
Content-Type: application/json
{
"location_id": "LOC001",
"evse_uids": ["EVSE001"]
}
Response example
{
"status_code": 1000,
"data": {
"allowed": "ALLOWED",
"token": {
"uid": "TOKEN001",
"type": "RFID",
"contract_id": "CONTRACT001"
},
"location": { ... },
"authorization_reference": "AUTH-REF-001"
}
}
Authorization results
| Value | Meaning |
|---|---|
ALLOWED | Token authorized for charging |
BLOCKED | Token explicitly blocked |
NOT_ALLOWED | Token not valid at this location |
UNKNOWN | CPO could not determine (often unreachable) |
Rate limit
100 requests/minute per party.
Routing
Authorization is forwarded only to CPOs with active routing rules for the eMSP.
OCPI spec
See OCPI 2.2.1 Tokens module for full authorization request/response objects.