API for browsing, adding, editing and deleting Rate Tiers.
GET /ratetiers
Return a list of Rate Tiers.
GET /rateplans/{RatePlanId}/ratetiers
Return a list of Rate Tiers assigned to the specified Rate Plan.
GET /ratetiers/{Id}
Return a specific Rate Tier.
POST /ratetiers
Create a new Rate Tier.
POST /ratetiers/copy
Upload a file for importing Rate Tiers.
PUT /ratetiers/{Id}
Update an existing Rate Tier.
DELETE /ratetiers/{Id}
Delete the specified Rate Tier.
GET /ratetieritems
Return a list of Rate Tier Items.
GET /ratetieritems/{Id}
Return a specific Rate Tier Item.
POST /ratetieritems
Create a new Rate Tier Item.
PUT /ratetieritems/{Id}
Update an existing Rate Tier Item.
DELETE /ratetieritems/{Id}
Delete the specified Rate Tier Item.
GET /ratetiers/{RateTierId}/ratetieritems
Return an array of Rate Tier Items for the specified Rate Tier.
POST /ratetiers/{RateTierId}/ratetieritems
Add an array of Rate Tier Items for the specified Rate Tier.
PUT /ratetiers/{RateTierId}/ratetieritems
Update an array of Rate Tier Items for the specified Rate Tier.
Looking up a Resource (single objects, lists and tabular data)
Creating a Resource
Copying a Resource
Updating a Resource
Deleting a Resource
Rates API
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.
{
"RateTierId": 5,
"NewRateTierName": "New Rate Tier"
}
{
"RateTierId": 0,
"RateTier": "",
"Description": ""
]
{
"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
}
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
}
]
}
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. |
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. |