Tokens
Tokens in OCPI 2.2.1
A Token represents the identification used to authorize charging. Append the token UID and /authorize to the advertised Tokens endpoint. LocationReferences is optional. A request without it can succeed when the eMSP has enough information; the insufficient-information condition is not every missing request body. The later response includes a complete Token for a known token. An unknown token returns OCPI 2004 without data; insufficient location information requires 2002.
Sources (6)
Example payload · bodiless-known-token-authorization
{
"allowed": "ALLOWED",
"token": {
"uid": "EXAMPLE-TOKEN",
"type": "RFID",
"issuer": "Example Provider",
"valid": true,
"whitelist": "NEVER",
"last_updated": "2026-01-01T00:00:00Z",
"country_code": "NL",
"party_id": "EXB",
"contract_id": "EXAMPLE-CONTRACT"
}
}Example payload · insufficient-location-envelope
{
"status_code": 2002,
"timestamp": "2026-01-01T00:00:00Z"
}Example payload · unknown-token-envelope
{
"status_code": 2004,
"timestamp": "2026-01-01T00:00:00Z"
}Which endpoints does this module define?
These paths illustrate the requests. Use the URLs advertised by your partner, replace the placeholders and choose the matching interface. A listed method does not establish that this site's simulator implements it.
CPO · receiver interface
Retrieve a Token as it is stored in the CPO system.
GET/ocpi/ 2.2.1/ tokens/ {country_code}/ {party_id}/ {token_uid} Push new/updated Token object to the CPO.
PUT/ocpi/ 2.2.1/ tokens/ {country_code}/ {party_id}/ {token_uid} Notify the CPO of partial updates to a Token.
PATCH/ocpi/ 2.2.1/ tokens/ {country_code}/ {party_id}/ {token_uid}
Source
eMSP · sender interface
Get the list of known Tokens, last updated between the {date_from} and {date_to} (paginated)
GET/ocpi/ 2.2.1/ tokens/ Real-time authorization request
POST/ocpi/ 2.2.1/ tokens/ {token_uid}/ authorize
Source
Try an endpoint
Send a request to this site's OCPI endpoints and read the answer. It never reaches your own system.