Add new promotion code
Required parameters
Parameter | Description |
code | Promotion code |
coupon_type | Coupon Type, one of: [cart , invoice , invoice_cart , flavor ] |
value | Discount amount |
type | Discount type [fixed ,percent ] |
clients | Required if coupon_type set to invoice_cart . Possible values [all ,new ,existing ] |
Optional parameters
Parameter | Description |
notes | Coupon Admin-only notes |
apply_products | Set 'on' if you want to set promotions for specific products |
products | Array containing product ids to which the promotion applies |
apply_categories | Set 'on' if you want to set promotions for specific categories |
categories | Array containing categories ids to which the promotion applies |
apply_addons | Set 'on' if you want to set promotions for specific addons |
addons | Array containing addons ids which the promotion applies |
apply_domains | Set 'on' if you want to set promotions for specific domains |
domains | Array containing domains tlds which the promotion applies |
cycles | Array of Cycles : possible values ['Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Biennially', 'Triennially', 'Quadrennially', 'Quinquennially'] |
client_id | Client Id - set if you want the promotion to apply to a specific customer |
expires | Expiration date |
max_usage_limit | Set 1 if you want to set usage_limit |
usage_limit | Usage limit |
max_client_usage_limit | Set 1 if you want to set max_client_usage |
max_client_usage | Max client usage |
status | Status, possible values ['Active', 'Archived'] |
Request
PHP Samples
Response