Limit discounts by products and categories

You can limit the application of discount coupons and promotions to certain products and categories to create product promos or category sales.

If you don't yet have an app for Ecwid API access, start with the following instructions.

Set products and categories for promotion

If you have an existing promotion, you can make it affect only specific products and products from a specific category with the following API call:

PUT /api/v3/STOREID/promotions/PROMOTIONID
Host: app.ecwid.com
Content-Type: application/json
Authorization: Bearer secret_token

{
    "targets": {
        "products": [102039482, 236754267],
        "categories": [0, 80056181]
    }
}

where products and categories are arrays of product and category IDs (find product ID, find category ID).

Change STOREID with your store ID, PROMOTIONID with the promotion ID (find promotion ID), and the secret_token with the secret access token of your app.

Limit promotion by a specific product variation

You can also limit promotion by specific variation IDs to make offers like 10% off for XL blouses:

PUT /api/v3/STOREID/promotions/PROMOTIONID
Host: app.ecwid.com
Content-Type: application/json
Authorization: Bearer secret_token

{
    "targets": {
        "products": [102039482, 236754267],
        "combinations": [1006525572, 1086715627]
    }
}

where combinations is an array of product combination IDs (find variation ID).

Change STOREID with your store ID, PROMOTIONID with the promotion ID (find promotion ID), and the secret_token with the secret access token of your app.

Set products and categories for discount coupon

If you have an existing discount coupon, you can make it work with specific products and products from a specific category with the following API call:

PUT /api/v3/STOREID/discount_coupons/DISCOUNTCOUPONID
Host: app.ecwid.com
Content-Type: application/json
Authorization: Bearer secret_token

{
    "catalogLimit": {
        "products": [102039482, 236754267],
        "categories": [0, 80056181]
    }
}

where products and categories are arrays of product and category IDs (find product ID, find category ID).

Change STOREID with your store ID, DISCOUNTCOUPONID with the discount coupon ID (find discount coupon ID), and the secret_token with the secret access token of your app.

Last updated

Was this helpful?