Hub role: RECEIVER (CPO push)
When you PUT a tariff, routed eMSPs receive PUT on their tariffs RECEIVER URL. See Async Delivery.
Endpoints
| Method | Path | Description |
|---|---|---|
PUT | /ocpi/2.2.1/tariffs/{cc}/{pid}/{tariff_id} | Create or replace tariff |
There is no PATCH tariff endpoint. You must PUT the full tariff object to update.
Use your own CPO country_code and party_id in URL paths and object bodies. See Hub Receiver Identity (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"
}
Hub pull from CPO (admin)
Operators can trigger a manual sync from your SENDER GET /tariffs endpoint via the admin API (POST /admin/v1/parties/{id}/pull/tariffs). Updates overwrite the current tariff catalog only; existing CDRs retain the tariff snapshot embedded at charge time.
OCPI spec
See OCPI 2.2.1 Tariffs module for full Tariff object definitions.