# API: Add promotion code

# addPromoCode

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

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=addPromoCode&code=CODE&coupon_type=COUPON_TYPE&value=VALUE&type=TYPE&clients=CLIENTS

# PHP Samples

# PHP Samples: Adding promo code

# Response

{
    "success": true,
    "code": "TSEREDSE",
    "call": "addPromoCode",
    "server_time": 1741165873,
    "info": [
        "New coupon created"
    ]
}
Last Updated: 3/10/2025, 3:22:33 PM