# API: Update promotion code

# updatePromoCode

Update promotion code by its id

# Required parameters

Parameter Description
id Coupon Id
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 Note
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=updatePromoCode&id=ID&code=CODE&coupon_type=COUPON_TYPE&value=VALUE&type=TYPE&clients=CLIENTS

# PHP Samples

# PHP Samples: Edit coupon

# Response

{
    "success": true,
    "call": "updatePromoCode",
    "server_time": 1741170201,
    "info": [
        "Coupon details changed"
    ]
}
Last Updated: 3/10/2025, 3:22:33 PM