Skip to navigation

Update a tariff

Changes only the fields sent; currency and elements cannot be cleared. Sessions already started keep their price. Partner tariffs are read-only (409).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

tariff_idstringRequired1-36 characters
OCPI tariff id.

Headers

If-Matchstring or nullOptional

Optional. The last_updated value you read; the write is refused with 412 if the object changed since.

Request

This endpoint expects an object.
currencystring or nullOptionalformat: "^[A-Z]{3}$"
typeenum or nullOptional

OCPI TariffType stored on ocpp.ocpp_tariffs.type.

Allowed values:
tariff_alt_textlist of objects or nullOptional
tariff_alt_urlstring or nullOptional<=255 characters
min_priceobject or nullOptional
max_priceobject or nullOptional
preauthorize_amountdouble or string or nullOptional
tax_includedenum or nullOptional

OCPI tax flag stored on ocpp.ocpp_tariffs.tax_included.

Allowed values:
elementslist of objects or nullOptional
start_date_timedatetime or nullOptional
end_date_timedatetime or nullOptional
energy_mixobject or nullOptional
ocpi_versionenum or nullOptional
OCPI version string stored on the tariff row.
Allowed values:
expected_revisioninteger or nullOptional>=1

Response

The object after the update.
idinteger
organization_idstring
tariff_idstring
country_codestring
party_idstring
currencystring
elementslist of objects
rolestring
originenum or any
ocpi_versionenum or any
last_updateddatetime
revisioninteger
created_atdatetime
updated_atdatetime
typeenum or any or nullOptional
tariff_alt_textlist of objects or nullOptional
tariff_alt_urlstring or nullOptional
min_priceobject or nullOptional
max_priceobject or nullOptional
preauthorize_amountstring or nullOptional
tax_includedenum or any or nullOptional
start_date_timedatetime or nullOptional
end_date_timedatetime or nullOptional
energy_mixobject or nullOptional
ocpp_versionstring or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
409
Conflict Error
412
Precondition Failed Error
422
Unprocessable Entity Error
429
Too Many Requests Error
502
Bad Gateway Error
504
Gateway Timeout Error