Product Promotion Code Samples

Beta

Buy one and get one free

Example request
1{
2 "name": "Buy one and get one free",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "action": {"gift_item": {"product_id": 130, "quantity": 1}},
7 "apply_once": false,
8 "stop": false,
9 "currency_code": "AUD",
10 "condition": {"cart": {"items": {"products": [130]}, "minimum_quantity": 1}}
11 }
12 ],
13 "notifications": [
14 {"type": "UPSELL", "content": "", "locations": ["CART_PAGE"]},
15 {"type": "ELIGIBLE", "content": "", "locations": ["CART_PAGE"]},
16 {"type": "APPLIED", "content": "", "locations": ["CART_PAGE"]}
17 ],
18 "stop": false,
19 "status": "ENABLED",
20 "start_date": "2019-02-06T05:00:00+00:00",
21 "end_date": "2019-02-09T04:59:59+00:00"
22}

Buy (X units) of product A and get (Y units) of product B for $ or % off per unit

Example request
{
"name": "Buy two X and get 10% off Y",
"redemption_type": "AUTOMATIC",
"rules": [
{
"action": {
"cart_items": {
"discount": {
"percentage_amount": "10"
},
"strategy": "LEAST_EXPENSIVE",
"as_total": false,
"include_items_considered_by_condition": false,
"items": {
"products": [
130
]
},
"quantity": 1
}
},
"apply_once": false,
"stop": false,
"condition": {
"cart": {
"items": {
"products": [
129
]
},
"minimum_quantity": 1
}
}
}
],
"notifications": [
{"type": "UPSELL", "content": "", "locations": ["CART_PAGE"]},
{"type": "ELIGIBLE", "content": "", "locations": ["CART_PAGE"]},
{"type": "APPLIED", "content": "", "locations": ["CART_PAGE"]}
],
"stop": false,
"status": "ENABLED"
}

Get $ or % off product X

Example request
1{
2 "name": "Spend 100 dollars and get 10% off small orbit",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "action": {
7 "cart_items": {
8 "discount": {
9 "percentage_amount": "10"
10 },
11 "strategy": "LEAST_EXPENSIVE",
12 "as_total": false,
13 "include_items_considered_by_condition": false,
14 "items": {
15 "products": [
16 130
17 ]
18 },
19 "quantity": 1
20 }
21 },
22 "apply_once": true,
23 "stop": false,
24 "condition": {
25 "cart": {
26 "minimum_spend": "100"
27 }
28 }
29 }
30 ],
31 "notifications": [
32 {"type": "UPSELL", "content": "", "locations": ["CART_PAGE"]},
33 {"type": "ELIGIBLE", "content": "", "locations": ["CART_PAGE"]},
34 {"type": "APPLIED", "content": "", "locations": ["CART_PAGE"]}
35 ],
36 "stop": false,
37 "status": "ENABLED"
38}

Take X% off the most expensive item in the cart

Example request
1{
2 "name": "Apply 20% off most expensive cart item",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "action": {
7 "cart_items": {
8 "discount": {
9 "percentage_amount": "20"
10 },
11 "quantity": 1,
12 "strategy": "MOST_EXPENSIVE",
13 "as_total": false
14 }
15 },
16 "apply_once": true,
17 "stop": false
18 }
19 ],
20 "notifications": [
21 {
22 "type": "UPSELL",
23 "content": "<div>&nbsp;</div>",
24 "locations": [
25 "CART_PAGE"
26 ]
27 },
28 {
29 "type": "ELIGIBLE",
30 "content": "<div>&nbsp;</div>",
31 "locations": [
32 "CART_PAGE"
33 ]
34 },
35 {
36 "type": "APPLIED",
37 "content": "<div>&nbsp;</div>",
38 "locations": [
39 "CART_PAGE"
40 ]
41 }
42 ],
43 "stop": false,
44 "current_uses": 0,
45 "max_uses": null,
46 "start_date": "2019-01-31T05:00:00+00:00",
47 "end_date": null,
48 "status": "ENABLED"
49}

Buy X product variant and get X product variant free

Example request
1{
2 "name": "Buy X product variant and get X product variant free",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "action": {
7 "gift_item": {
8 "variant_id": 151,
9 "quantity": 1
10 }
11 },
12 "apply_once": false,
13 "stop": false,
14 "currency_code": "GBP",
15 "condition": {
16 "cart": {
17 "items": {
18 "variants": [
19 139
20 ]
21 },
22 "minimum_quantity": 2
23 }
24 }
25 }
26 ],
27 "notifications": [
28 {
29 "type": "UPSELL",
30 "content": "<div>&nbsp;</div>\r\n<div>&nbsp;</div>",
31 "locations": [
32 "CART_PAGE"
33 ]
34 },
35 {
36 "type": "ELIGIBLE",
37 "content": "<div>&nbsp;</div>\r\n<div>&nbsp;</div>",
38 "locations": [
39 "CART_PAGE"
40 ]
41 },
42 {
43 "type": "APPLIED",
44 "content": "<div>&nbsp;</div>\r\n<div>&nbsp;</div>",
45 "locations": [
46 "CART_PAGE"
47 ]
48 }
49 ],
50 "stop": false,
51 "status": "ENABLED"
52}

Amount off

Example request
1{
2 "name": "US $50 off a specific product",
3 "redemption_type": "AUTOMATIC",
4 "currency_code": "USD",
5 "rules": [
6 {
7 "apply_once": false,
8 "condition": {
9 "cart": {
10 "items": {
11 "products": [
12 129
13 ]
14 },
15 "minimum_quantity": 1
16 }
17 },
18 "action": {
19 "cart_items": {
20 "discount": {
21 "fixed_amount": "50"
22 },
23 "items": {
24 "products": [
25 130
26 ]
27 },
28 "quantity": 1,
29 "include_items_considered_by_condition": true
30 }
31 }
32 }
33 ]
34}

Percentage off

Example request
1{
2 "name": "US 15% off a specific product",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "apply_once": false,
7 "condition": {
8 "cart": {
9 "items": {
10 "products": [
11 129
12 ]
13 },
14 "minimum_quantity": 1
15 }
16 },
17 "action": {
18 "cart_items": {
19 "discount": {
20 "percentage_amount": "75"
21 },
22 "items": {
23 "products": [
24 130
25 ]
26 },
27 "quantity": 1,
28 "include_items_considered_by_condition": true
29 }
30 }
31 }
32 ]
33}

Buy three for the price of two

Example request
1{
2 "name": "Buy three for the price of two",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "apply_once": false,
7 "condition": {
8 "cart": {
9 "items": {
10 "products": [
11 129
12 ]
13 },
14 "minimum_quantity": 2
15 }
16 },
17 "action": {
18 "cart_items": {
19 "discount": {
20 "percentage_amount": "100"
21 },
22 "items": {
23 "products": [
24 130
25 ]
26 },
27 "quantity": 1
28 }
29 }
30 }
31 ]
32}

Buy extra-small or medium item and get free shipping to zone id 1 (Product Options Item Matcher)

Example request
1{
2 "name": "Buy extra-small or medium item and get free shipping to zone id 1",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "condition":{
7 "cart":{
8 "items": {
9 "product_option": {
10 "type": "string_match",
11 "name": "Size",
12 "values": [
13 "XS",
14 "M"
15 ]
16 }
17 },
18 "minimum_quantity": 1
19 }
20 },
21 "action":{
22 "shipping":{
23 "free_shipping":true,
24 "zone_ids":[
25 1
26 ]
27 }
28 }
29 }
30 ]
31}

Buy extra-small blue or medium blue item and receive free shipping (Product Options Item Matcher)

Example request
1{
2 "name": "Buy extra-small blue or medium blue item and receive free shipping",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "condition": {
7 "cart": {
8 "items": {
9 {
10 "product_option": {
11 "type": "string_match",
12 "name": "Size",
13 "values": [
14 "XS",
15 "M"
16 ]
17 }
18 },
19 {
20 "product_option": {
21 "type": "string_match",
22 "name": "Color",
23 "values": [
24 "Blue"
25 ]
26 }
27 }
28 },
29 "minimum_quantity": 1
30 }
31 },
32 "action": {
33 "shipping": {
34 "free_shipping": true,
35 "zone_ids": [
36 1
37 ]
38 }
39 }
40 }
41 ]
42}

Take 20% off all men’s clothing (Product Custom Field Item Matcher)

Example request
1{
2 "name": "Apply 20% off all male clothing",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "action": {
7 "cart_items": {
8 "discount": {
9 "percentage_amount": "20"
10 },
11 "items": {
12 "product_custom_field": {
13 "name": "Gender",
14 "values": [
15 "Mens"
16 ]
17 }
18 }
19 }
20 }
21 }
22 ]
23}

Get 1offeachproductpriceupto1 off each product price up to 5 (limited discount maximum)

Example request
1{
2 "can_be_used_with_other_promotions": true,
3 "channels": [],
4 "coupon_overrides_automatic_when_offering_higher_discounts": false,
5 "currency_code": "USD",
6 "current_uses": 0,
7 "created_from": "api",
8 "customer": {
9 "group_ids": [],
10 "minimum_order_count": 0,
11 "segments": null,
12 "excluded_group_ids": []
13 },
14 "end_date": null,
15 "max_uses": null,
16 "name": "Discount on products - fixed amount - each product price - api",
17 "notifications": [],
18 "redemption_type": "AUTOMATIC",
19 "rules": [
20 {
21 "action": {
22 "cart_items": {
23 "add_free_item": false,
24 "discount": {
25 "fixed_amount": "1",
26 },
27 "maximum_allowed_discount_amount": "5",
28 "exclude_items_on_sale": false,
29 "include_items_considered_by_condition": false,
30 "as_total": false,
31 "strategy": "LEAST_EXPENSIVE"
32 }
33 },
34 "apply_once": true,
35 "stop": false
36 }
37 ],
38 "schedule": null,
39 "shipping_address": null,
40 "start_date": "2025-10-15T00:00:00-05:00",
41 "status": "ENABLED",
42 "display_name": "Get $1 off each product price upto $5"
43}

Get 10% off each product price up to $20 (limited discount maximum)

Example request
1{
2 "can_be_used_with_other_promotions": true,
3 "channels": [],
4 "coupon_overrides_automatic_when_offering_higher_discounts": false,
5 "currency_code": "USD",
6 "current_uses": 0,
7 "created_from": "api",
8 "customer": {
9 "group_ids": [],
10 "minimum_order_count": 0,
11 "segments": null,
12 "excluded_group_ids": []
13 },
14 "end_date": null,
15 "max_uses": null,
16 "name": "discount on products - percent - each product price",
17 "notifications": [],
18 "redemption_type": "AUTOMATIC",
19 "rules": [
20 {
21 "action": {
22 "cart_items": {
23 "add_free_item": false,
24 "discount": {
25 "percentage_amount": "10",
26 },
27 "maximum_allowed_discount_amount": "20",
28 "exclude_items_on_sale": false,
29 "include_items_considered_by_condition": false,
30 "as_total": false,
31 "strategy": "LEAST_EXPENSIVE"
32 }
33 },
34 "apply_once": true,
35 "stop": false
36 }
37 ],
38 "schedule": null,
39 "shipping_address": null,
40 "start_date": "2025-10-15T00:00:00-05:00",
41 "status": "ENABLED",
42 "display_name": "Get 10% off each product price upto $20"
43}