Endpoints
| Method | Path | Description |
|---|---|---|
GET | /ocpi/2.2.1/credentials | Retrieve current credentials |
POST | /ocpi/2.2.1/credentials | Initial credentials exchange |
PUT | /ocpi/2.2.1/credentials | Update or confirm credentials |
Hub role: RECEIVER (partners call Hub)
POST — initial exchange
Used during onboarding to exchange tokens and URLs.
POST /ocpi/2.2.1/credentials
Authorization: Token {hub-issued-initial-token}
Content-Type: application/json
{
"token": "partner-token",
"url": "https://partner.example.com/ocpi/2.2.1",
"roles": [
{
"role": "CPO",
"party_id": "ABC",
"country_code": "IN",
"business_details": { "name": "Example CPO" }
}
]
}
Response
{
"status_code": 1000,
"data": {
"token": "hub-token-for-partner",
"url": "https://hub.chargeindia.com/ocpi/2.2.1",
"roles": [
{
"role": "HUB",
"party_id": "CIH",
"country_code": "IN",
"business_details": { "name": "ChargeIndia Hub" }
}
]
}
}
PUT — update or rotate
Used to confirm exchange or rotate tokens.
GET — retrieve
Returns current credentials for the authenticated party.