Discount Plans
A discount plan is the template for a customer discount or allowance, such as 500 inclusive UK minutes a month or 20% off international calls. See the Discount Plans guide for how plans work, and Tariff and Discount Detail Records for the allowance buckets they create.
Methods
Section titled “Methods”Retrieve Single Discount Plan
Section titled “Retrieve Single Discount Plan”/backend/api/v1/discountPlans/ID - fetch the discount plan with the specified ID.
List Discount Plans
Section titled “List Discount Plans”/backend/api/v1/discountPlans/ - list all discount plans.
Additional Query Parameters
Section titled “Additional Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
idAfter | integer | No | Only include discount plans with a higher ID |
createdSince | datetime | No | Only include discount plans created since the given time |
updatedSince | datetime | No | Only include discount plans updated since the given time |
/backend/api/v1/discountPlans/ - add a new discount plan. The newly-added discount plan will be returned.
/backend/api/v1/discountPlans/ID - update the discount plan with the specified ID. The modified discount plan will be returned.
DELETE
Section titled “DELETE”/backend/api/v1/discountPlans/ID - delete the discount plan with the specified ID.
Fields
Section titled “Fields”| Field | Name | Type | Description |
|---|---|---|---|
| discountPlanName | Discount Plan Name | Text | Name of the discount plan as it appears throughout the system |
| discountPlanShortName | Discount Plan Name (Short) | Text | Abbreviated name for display in reports and summaries |
| discountPlanDescription | Discount Plan Description | Text | Detailed description of what this discount plan provides |
| discountPercent | Discount Percent | Number | Percentage discount to apply to qualifying calls |
| discountPencePerCall | Discount Per Call | Number | Fixed discount amount per qualifying call |
| discountPencePerMinute | Discount Per Minute | Number | Fixed discount amount per minute of qualifying calls |
| availability | Discount Plan Availability | Preset Value | Controls who can see and use this discount plan |
| currency | Currency | Preset Value | Currency this discount plan is denominated in |
| customerID | Customer | Text | The ID of the customer this discount plan is for |
| customerGroups | Customer Groups | Text | Customer groups that can use this discount plan |
| allowanceMinutes | Discounted Minutes | Number | Number of minutes to discount or include in allowance pool |
| allowanceBytes | Discounted Data (Bytes) | Number | Number of bytes to discount or include in allowance pool |
| allowanceEvents | Discounted Events | Number | Number of events to discount or include in allowance pool |
| allowanceCalls | Discounted Calls | Number | Number of calls to discount or include in allowance pool |
| allowanceValue | Cash Discount | Number | Monetary amount to discount or include in allowance pool |
| nominalValue | Nominal Value | Number | Nominal value of the discount plan for reporting purposes |
| customerWide | Customer-Wide | Preset Value | Whether allowances are shared across all customer numbers |
| useAllowancePool | Fill / Use Allowance Pool | Preset Value | Whether this discount plan uses shared allowance pools |
| allowancePoolAttachedNumber | Allowance Pool Used By Attached Number | Preset Value | Whether the allowance pool is used by the number this feature is attached to |
| allowancePoolAllNumbers | Allowance Pool Used By All Numbers | Preset Value | Whether the allowance pool is used by all customer numbers |
| allowancePoolNumberTypes | Allowance Pool Used By Number Types | Preset Value(s) | Number types that can use this allowance pool |
| discountALeg | Discount Matching A Leg | Preset Value | Whether to discount the A leg of matching calls |
| callPartialDiscountAction | Part-Free Call | Preset Value | How to handle calls that are partially covered by allowances |
| roundSeconds | Round Used Duration Up To Next | Number | Round call duration up to the next specified number of seconds |
| roundBytes | Round Used Bytes Up To Next | Number | Round data usage up to the next specified number of bytes |
| roundEvents | Round Used Events Up To Next | Number | Round event usage up to the next specified number of events |
| roundPence | Round Used Cost Up To Next | Text | Round cost up to the next specified amount in pence |
| applyToAllCallTypes | All Call Types | Preset Value | Whether this discount applies to all call types |
| applyToTariffGroup | Use Discount Plan on Tariff | Preset Value | Whether to apply this discount plan to tariff calculations |
| daytimeCallTypeGroups | Standard Call Type Groups (Daytime) | Preset Value(s) | Array of call type group IDs for daytime discounts |
| eveningCallTypeGroups | Standard Call Type Groups (Evening) | Preset Value(s) | Array of call type group IDs for evening discounts |
| weekendCallTypeGroups | Standard Call Type Groups (Weekend) | Preset Value(s) | Array of call type group IDs for weekend discounts |
| daytimeCallTypeCustomGroups | Custom Call Type Groups (Daytime) | Preset Value(s) | Array of custom call type group IDs for daytime discounts |
| eveningCallTypeCustomGroups | Custom Call Type Groups (Evening) | Preset Value(s) | Array of custom call type group IDs for evening discounts |
| weekendCallTypeCustomGroups | Custom Call Type Groups (Weekend) | Preset Value(s) | Array of custom call type group IDs for weekend discounts |
| daytimeCallTypes | Call Types (Daytime) | Preset Value(s) | Array of call type IDs for daytime discounts |
| eveningCallTypes | Call Types (Evening) | Preset Value(s) | Array of call type IDs for evening discounts |
| weekendCallTypes | Call Types (Weekend) | Preset Value(s) | Array of call type IDs for weekend discounts |
| applyToCallCarriers | Call Carriers | Preset Value(s) | Carriers this discount applies to |
| useCallTypeWeights | Use Call Type Weights | Preset Value | Whether to use call type weights in discount calculations |
| applyToCallCosts | Call Costs | Preset Value | Call cost ranges this discount applies to |
| discountAccessCharge | Calls With Access Charge | Preset Value | How to handle calls with access charges |
| weightAccessCharge | Access Charge Weight | Number | Weight percentage for access charge discounting |
| discountOriginationSurcharge | Calls With Origination Surcharge | Preset Value | How to handle calls with origination surcharges |
| weightOriginationSurcharge | Origination Surcharge Weight | Number | Weight percentage for origination surcharge discounting |
| discountRecordingSurcharge | Calls With Recording Surcharge | Preset Value | How to handle calls with recording surcharges |
| weightRecordingSurcharge | Recording Surcharge Weight | Number | Weight percentage for recording surcharge discounting |
| applyToDurationMin | Minimum Call Duration | Number | Minimum call duration for discount to apply |
| applyToDurationMax | Maximum Call Duration | Number | Maximum call duration for discount to apply |
| id | Discount Plan ID | Text | The unique identifier for this discount plan |