getAccountRates()

This application is used to get rates of an account.


Implementation details:

  • This function supports trusted mode in which case i_customer (integer) parameter should be supplied


Related documentation:

Tariff's Rates Management


Parameters:

  • i_account - i_account of account. Integer. Required.
  • i_tariff - Tariff ID. Integer. Optional. Default is the account's tariff.
  • offset - Number of rates to skip. Integer. Optional. Default is 0.
  • limit - Maximum number of rates per page. Integer. Optional. Default is 50.
  • prefix - Prefix pattern (SQL LIKE syntax). String. Optional.
  • country - Country name pattern (SQL LIKE syntax). String. Optional. Since Sippy 2025 
  • current_only - Return currently active rates only. Boolean. Optional. Default is false. Since Sippy 2025 


An explicit tariff must belong to the customer and be the account's default tariff or be assigned through its Authentication or Post Auth Rules.

By default, one rate is returned per prefix, including future and expired rates. With current_only=true, all active versions are returned, newest first within each prefix. Forbidden rates are always excluded. Since Sippy 2025 

 

Returns:

  • result - OK - String.
  • currency - currency of the selected tariff. String.
  • rates - an array containing structures:
    • prefix - Prefix. String.
    • country - Country name. String or null.
    • description - Destination description. String or null.
    • rate - Per-minute rate. Double.
    • local_rate - Local per-minute rate. Double. Returned for tariffs with local calling enabled.
  • pagination- Pagination information Since Sippy 2025:
    • page - Current page, starting from 1. Integer.
    • items_per_page - Number of items per page. Integer.
    • total_items - Total number of matching rates. Integer.
  • XMLRPC fault in case of any error.

Example:

{
    "i_customer": 56,
    "i_account": 12333,
    "i_tariff": 4564,
    "prefix": "1%",
    "country": "%Canada%",
    "current_only": true,
    "limit": 20,
    "offset": 0
}

Use limit and offset to retrieve each page.