The update_coupon_m API updates an existing coupon.
Note: The previously existing input and/or output fields <client_item_id>, <client_item_id_out> and/or <filter_client_item_id> were removed from this API call in Release 47.
| API Specification: |
update_coupon_m
|
| Required Fields: |
- <client_no>
- <auth_key>
- <coupon_cd>
- <coupon_desc>
- <template> (array)
- <credit_template_name>
- <discount_type>
- <discount_amt>
- <discount_rule> (array)
- <label>
- <rule_id>
- <description>
- <ext_description>
- <flat_percent_ind>
- <amount>
- <currency>
- <duration_type_ind>
- <inline_offset_ind>
- <discount_behavior_type_ind>
- <scope_no>
- <bundle_name>
- <bundle_id>
- <bundle_description>
- <allow_overlap_ind>
|
Additional Guidance
- Limitations to <coupon_scope> field: The "Individual Plan Instances" level option (4) is not valid for "Coupon Application = Account or Plan Instance", and is valid only for Discount Rule/Bundle coupons (not for Credit Template coupons).
Input Fields
| Field Name |
Notes |
| <status_ind> |
Allowable Values
| Values |
Description |
| 1 |
Active |
| 0 |
Inactive |
|
| <flat_percent_ind> |
Allowable Values
| Values |
Description |
| P |
Percentage discount type |
| F |
Fixed discount type |
|
| <duration_type_ind> |
Allowable Values
| Values |
Description |
| U |
Number of uses |
| M |
Duration in months |
| W |
Duration in weeks |
| D |
Duration in days |
| I |
Never expires |
|
| <applicable_trans_scope> |
Allowable Values
| Values |
Description |
| E |
Applies discount to each transaction on the invoice (current behavior) |
| M |
Applies discount to all the transaction on the invoice. Any remaining credit will be carried over to next month. |
|
| <scope_no> |
Allowable Values
| Values |
Description |
| 0 |
All Charges |
| 10 |
All Plan Charges, All Plans |
| 11 |
All Plan Charges, Specified Plans |
| 12 |
All Plans, Specified Service Charges |
| 13 |
Specified Plan/Service Charges |
| 21 |
All Recurring Service Charges |
| 22 |
All Usage Service Charges |
| 23 |
All Activation Service Charges |
| 30 |
All Item Charges |
| 31 |
Specified Item Charges |
|
| <use_all_or_nth_subs_rule> |
Allowable Values
| Values |
Description |
| TRUE |
Apply discount when 'all' of the plans are under the account |
| FALSE |
Apply discount when 'some' of the plans are under the account |
|
| <allow_overlap_ind> |
Allowable Values
| Values |
Description |
| Y |
Yes |
| N |
No |
|
| <coupon_scope> |
Allowable Values
| Values |
Description |
| 1 |
Coupon can be applied to Account only |
| 2 |
Coupon can be applied to Master plan instance only |
| 3 |
Coupon can be applied to Account & Master plan instance |
| 4 |
Coupon can be applied to individual plan instances |
|
| <remainder_discount_rule_indicator> |
When set as 1, it will prorate the discount applied on the initial invoice if the respective charge is prorated and then force the remaining proportion of the discount on its final application. In any of its application, if respective charge is prorated, then the discount also gets prorated. By default it's null. This parameter is applicable only for (a) duration_type_ind = M (months type duration) and (b) duration_type_ind = U (usage count type duration) with flat_percent_ind = F (fixed discount type).
Allowable Values
| Values |
Description |
| 1 |
Prorate the discount applied on the initial invoice if the respective charge is prorated and then force the remaining proportion of the discount on its final application. |
| NULL |
Do not prorate
|
|