Rate Tiers


API for browsing, adding, editing and deleting Rate Tiers.

URLs

Rate Tiers

Rate Tier Items

Rate Tier Items Array (by Rate Tier)

References

Looking up a Resource (single objects, lists and tabular data)
Creating a Resource
Copying a Resource
Updating a Resource
Deleting a Resource
Rates API

Notes

When adding or updating an array of Rate Tier Items, you do not need to specify the TierOrder, as it will be set based on the order of each item in the array.

Rate Tier Copy Object

{
  "RateTierId": 5,
  "NewRateTierName": "New Rate Tier"
}

Rate Tier Object

{
  "RateTierId": 0,
  "RateTier": "",
  "Description": ""
]

Rate Tier Item Object

{
  "RateTierItemId": 0,
  "RateTierId": 0,
  "RateTierName": "",
  "TierOrder": 0,
  "Duration": 0,
  "PerTierCharge": 0,
  "PerMinuteCharge": 0,
  "BillingIncrement": 0,
  "MinSecsBilled": 0,
  "ShortestCallAllowed": 0,
  "RateInterval": 0,
  "DisconnectCharge": 0,
  "DisconnectChargeType": "dctFixedAmount",
  "DisconnectChargeCallEnd": false
}

Example: Return an array of Rate Tier Items

GET ivrapi/RateTiers/1051/RateTierItems
---------------------------------------
{
  "status": "success",
  "message": "",
  "data": 
  [
    {
      "RateTierItemId": 1111,
      "RateTierId": 1051,
      "RateTierName": "Test - 106493345",
      "TierOrder": 1,
      "Duration": 10,
      "PerTierCharge": 0,
      "PerMinuteCharge": 0.1,
      "BillingIncrement": 0,
      "MinSecsBilled": 0,
      "ShortestCallAllowed": 0,
      "RateInterval": 0,
      "DisconnectCharge": 0,
      "DisconnectChargeType": "dctFixedAmount",
      "DisconnectChargeCallEnd": false
    },
    {
      "RateTierItemId": 1112,
      "RateTierId": 1051,
      "RateTierName": "Test - 106493345",
      "TierOrder": 2,
      "Duration": 11,
      "PerTierCharge": 0,
      "PerMinuteCharge": 0.2,
      "BillingIncrement": 0,
      "MinSecsBilled": 0,
      "ShortestCallAllowed": 0,
      "RateInterval": 0,
      "DisconnectCharge": 0,
      "DisconnectChargeType": "dctFixedAmount",
      "DisconnectChargeCallEnd": false
    },
    {
      "RateTierItemId": 1113,
      "RateTierId": 1051,
      "RateTierName": "Test - 106493345",
      "TierOrder": 3,
      "Duration": 12,
      "PerTierCharge": 0,
      "PerMinuteCharge": 0.3,
      "BillingIncrement": 0,
      "MinSecsBilled": 0,
      "ShortestCallAllowed": 0,
      "RateInterval": 0,
      "DisconnectCharge": 0,
      "DisconnectChargeType": "dctFixedAmount",
      "DisconnectChargeCallEnd": false
    },
    {
      "RateTierItemId": 1114,
      "RateTierId": 1051,
      "RateTierName": "Test - 106493345",
      "TierOrder": 4,
      "Duration": 13,
      "PerTierCharge": 0,
      "PerMinuteCharge": 0.4,
      "BillingIncrement": 0,
      "MinSecsBilled": 0,
      "ShortestCallAllowed": 0,
      "RateInterval": 0,
      "DisconnectCharge": 0,
      "DisconnectChargeType": "dctFixedAmount",
      "DisconnectChargeCallEnd": false
    }
  ]
}

Table Definitions

RATE_TIERS

This table stores Rate Tiers, which are used to create varying rate charges (per minute and/or per tier) that are assigned to one or more Rate Plan entries to allow the rate charged to a caller to vary based on the overall duration of the call.

Field Name Type Size Description
RATE_TIER_ID int 8 Primary key.
RATE_TIER varchar 40 Rate Tier name.
DESCRIPTION varchar 40 Rate Tier description.

RATE_TIER_ITEMS

This table stores the individual tier levels for each Rate Tier in the RATE_TIERS table.

Field Name Type Size Description
RATE_TIER_ITEM_ID int 4 Primary key.
RATE_TIER_ID int 4 Foreign key into the RATE_TIERS table that references the RATE_TIER associated with this entry.
TIER_ORDER tinyint 1 Determines the order of this entry as it relates to all other entries associated with the same RATE_TIER_ID.
DURATION smallint 2 Duration in seconds of this entry.
PER_TIER_CHARGE decimal (15,4) Fixed charge incurred by entering this tier during a call.
PER_MINUTE_CHARGE decimal (15,4) Per minute charge associated with this entry.
BILLING_INCREMENT smallint 2 Billing increment in seconds associated with this entry.
MIN_SECONDS_BILLED smallint 2 Specifies the minimum duration (in seconds) that a user will be billed for this entry.
SHORTEST_CALL_ALLOWED smallint 2 Specifies the amount of time (in seconds) that the caller must be able to afford, or the duration of the call will not extended into this tier entry.
RATE_INTERVAL tinyint 1 Rate interval to use for billing purposes (default: 60 seconds).
DISCONNECT_CHARGE decimal (15,4) The disconnect charge (amount or percentage) to bill the caller.
DISCONNECT_CHARGE_TYPE tinyint 1 Sets how the disconnect charge is applied (i.e. 0=Fixed amount, 1=Percentage (%)).
DISCONNECT_CHARGE_CALL_END bit 1 When set, specifies that the disconnect charge is applied at the end of the call.