A set of xmlapi methods to manage Tariff Rates


Related documentation:

XML-RPC API - Getting Rates of an Account

Tariffs and Rates

Understanding Rating and Billing

XML-RPC API - Data types specifications


Implementation details

Those methods support trusted mode, in which case the i_customer (integer) parameter should be supplied.



getTariffRatesList()

Get a list of rates available within a tariff.

Available since Sippy 2022.


Mandatory parameters

  • i_tariff - tariff id. Integer

Optional parameters

  • offset - skip first # offset records based on prefix. Integer.
  • limit - return only # limit records. Integer. Default value is 50. Possible values between 1 and 1000.


Returns

  • result - OK means that operation is successful. String.
  • rates - array of rates:
         • i_rate - unique identifier of rate. Integer.
         • prefix - prefix of the rate. String.
         • price_1 - price 1 (per min). Integer.
         • price_n - price n (per min). Integer.
         • interval_1 - interval 1 (sec). Integer.
         • interval_n - interval n (sec). Integer.
         • forbidden - If the rate is forbidden. Boolean. 
                                If type of the tariff is 'Incoming Tariff', forbidden flag is not returned.
         • grace_period_enable - grace period is enabled or not. Boolean.
         • activation_date - activation date. Time stamp dateTime.iso8601 format in UTC
         • expiration_date - expiration date. Time stamp dateTime.iso8601 format in UTC. nil means never expired.
    If type of the tariff is 'Tariff' and local_calling is enabled on a tariff, additional fields are included:
         • local_price_1 - local price 1 (per min). Integer.
         • local_price_n - local price n (per min). Integer.
         • local_interval_1 - local interval 1 (sec). Integer.
         • local_interval_n - local interval n (sec). Integer.
         • area_name - area name (associated geographic region). String.
  • XMLRPC fault in case of any error


deleteAllRatesInTariff()

Delete all rates within a tariff.

Available since Sippy 2024.


Mandatory parameters

  • i_tariff - ID of the tariff to delete all of the rates from. Integer. Required

Returns

  • result - OK means that operation is successful. String.
  • XMLRPC fault in case of any error