Endpoints
| Method | Path | Caller | Description |
|---|---|---|---|
PUT | /ocpi/2.2.1/tariffs/{cc}/{pid}/{tariff_id} | CPO | Create or replace tariff |
GET | /ocpi/2.2.1/tariffs | eMSP | List tariffs (paginated) |
GET | /ocpi/2.2.1/tariffs/{cc}/{pid}/{tariff_id} | eMSP | Tariff detail |
Hub role: RECEIVER (CPO push) + SENDER (eMSP pull)
There is no PATCH tariff endpoint. CPOs must PUT the full tariff object to update.
CPO push example
PUT /ocpi/2.2.1/tariffs/IN/ABC/TAR001
Authorization: Token {cpo-token}
Content-Type: application/json
{
"country_code": "IN",
"party_id": "ABC",
"id": "TAR001",
"currency": "INR",
"elements": [
{
"price_components": [
{ "type": "ENERGY", "price": 12.0, "step_size": 1 }
]
}
],
"last_updated": "2025-06-23T10:00:00.000Z"
}
eMSP pull example
GET /ocpi/2.2.1/tariffs?offset=0&limit=50
Authorization: Token {emsp-token}
Use tariffs for authorization pricing context. See India Conventions for INR requirements.
OCPI spec
See OCPI 2.2.1 Tariffs module for full Tariff object definitions.