Skip to navigation

Create a tariff

Creates a tariff for the OCPI party in the body. Assign it to connectors with POST /cpo/tariffs/{tariff_id}/assign so it prices new sessions.

Authentication

AuthorizationBearer

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

Request

This endpoint expects an object.
tariff_idstringRequired1-36 characters
currencystringRequiredformat: "^[A-Z]{3}$"
country_codestringRequiredformat: "^[A-Z]{2}$"
party_idstringRequiredformat: "^[A-Z0-9]{3}$"
elementslist of objectsRequired
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:
start_date_timedatetime or nullOptional
end_date_timedatetime or nullOptional
energy_mixobject or nullOptional
ocpi_versionenum or nullOptionalDefaults to 2.3.0
OCPI version string stored on the tariff row.
Allowed values:

Response

The created object.
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
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
502
Bad Gateway Error
504
Gateway Timeout Error