HomeGuidesAPI ReferenceChangelog
Terms of Use
API Reference

Tariff / Create

Create new tariff

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer | null

The operator ID for this resource.
Required for global admin tokens.
Optional for operator-scoped tokens (defaults to token's operator).

string
required
description
object | null

Each translated description supports up to 512 characters. HTML tags count toward the limit. Disallowed HTML, such as script blocks, is removed before the length is checked.

additionalInformation
object | null

Locales that have been created and are not provided on an update will be deleted. Please provide values in all locales that you wish to keep.

learnMoreUrl
object | null

Each translated value supports up to 255 characters.

string

A time when the day begins

string

A time when the night begins

pricing
object
discountTariffSettings
object

Discount configuration for discount based tariffs. Present only when type=discount based, omitted otherwise.

Tariff list and detail responses describe tariff configuration, not a price for a specific charging context. Discounts referencing specific_tariff can return discounted pricing from the configured source tariff. Discounts referencing base_tariff or roaming_tariff return an empty pricing object because these reads do not supply the source tariff group or roaming source needed to calculate an effective price. A price derived for an earlier session does not select the source for a later tariff read.

markupDiscountSettings
object

Markup and discount configuration for markup and discount tariffs. Required when creating a tariff of that type or changing a tariff to it, and prohibited for every other type.

The tariff adjusts the prices of a source tariff by a percentage, a flat amount or both.

pricing holds the settings the tariff has of its own. For this type it accepts only the properties below; any other pricing property is rejected with HTTP 422.

  • minPrice — minimum total amount per session; null means no minimum. Replaces the minimum price of the source tariff, with one exception: when categories.minimumPrice.percentage is set and the source tariff has a minimum price, the adjusted source minimum is used and this value is ignored. When it is not set, the minimum price of the source tariff applies, adjusted by global.percentage or categories.minimumPrice.percentage when one is set.
  • connectionFeeMinimumSessionDuration and connectionFeeMinimumSessionEnergy — used only when the source tariff has no connection fee of its own; otherwise the minimums of the source tariff apply. For a roaming tariff, used only for a connection fee that this tariff adds as a new price component.
  • taxID — applied only when Multi-tax Support is enabled in the platform settings; otherwise the value is ignored and the Default tax is used. null sets the Default tax, and a new tariff gets the Default tax when it is omitted.
  • preAuthorizeAmount and incrementalPreAuthorizationAmount — the tariff-level values; null clears one, so the default from User billing and payment settings applies.

With POST, null is rejected with HTTP 422 for every property of markupDiscountSettings and for minPrice and taxID; omit a property to leave it unset. The other pricing properties above accept null with POST, as for every other tariff type.

What happens to a property that is not submitted:

  • PUT, in markupDiscountSettings: it is removed. This applies to the values of global and to categories.
  • PUT, serviceFee category: depends on the operator setting "Display markup separately". When the setting is off, serviceFee is kept, but it is not used in the price calculation until the setting is turned on. When it is on, serviceFee is removed like any other category.
  • PUT, the pricing properties above: it keeps its stored value. Send null to clear it.
  • PATCH: it keeps its stored value. Send null to clear it.

Changing adjustmentMode clears the values of the previous mode, and changing sourceMode clears referencedTariffId.

stopSession
object
startSessionRestrictions
object
restrictions
object
partner
object
display
object
integer | null

References the internal integration configuration that enables this tariff type

string | null

Used to store custom information, usually used for external references or metadata to the resource.

string
enum
required

Setting the type to charging not allowed or free is enough for creating the particular type of tariff.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json