Category Promotion Code Samples

Apply a $ or % discount to each item in one or more categories

Example request
{
"name": "20 dollars off all garden material",
"redemption_type": "AUTOMATIC",
"rules": [
{
"action": {
"cart_items": {
"discount": {
"fixed_amount": "20"
},
"strategy": "LEAST_EXPENSIVE",
"as_total": false,
"include_items_considered_by_condition": false,
"items": {
"categories": [
24
]
}
}
},
"apply_once": true,
"stop": false
}
],
"notifications": [
{
"type": "UPSELL",
"content": "",
"locations": [
"CART_PAGE"
]
},
{
"type": "ELIGIBLE",
"content": "",
"locations": [
"CART_PAGE"
]
},
{
"type": "APPLIED",
"content": "",
"locations": [
"CART_PAGE"
]
}
],
"stop": false,
"start_date": "2019-01-29T00:00:00+00:00",
"status": "ENABLED"
}

Apply a $ or % discount to each item in one or more categories, exclude items on sale

Example request
{
"name": "20 dollars off all garden material, exclude items on sale",
"redemption_type": "AUTOMATIC",
"rules": [
{
"action": {
"cart_items": {
"discount": {
"fixed_amount": "20"
},
"strategy": "LEAST_EXPENSIVE",
"as_total": false,
"include_items_considered_by_condition": false,
"exclude_items_on_sale": true,
"items": {
"categories": [
19
]
}
}
},
"apply_once": true,
"stop": false
}
]
}

Buy X units in (category A) and get Y additional units in the same category free (must be of equal or lesser value)

Example request
1{
2 "name": "Buy X units in (Category A) and get Y additional units in the same category free (must be of equal or lesser value)",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "action": {
7 "cart_items": {
8 "discount": {
9 "percentage_amount": "100"
10 },
11 "strategy": "LEAST_EXPENSIVE",
12 "as_total": false,
13 "include_items_considered_by_condition": false,
14 "items": {
15 "categories": [
16 23
17 ]
18 },
19 "quantity": 1
20 }
21 },
22 "apply_once": true,
23 "stop": false,
24 "condition": {
25 "cart": {
26 "items": {
27 "categories": [
28 23
29 ]
30 },
31 "minimum_quantity": 1
32 }
33 }
34 }
35 ],
36 "notifications": [
37 {
38 "type": "UPSELL",
39 "content": "<div>&nbsp;</div>\r\n<div>&nbsp;</div>",
40 "locations": [
41 "CART_PAGE"
42 ]
43 },
44 {
45 "type": "ELIGIBLE",
46 "content": "<div>&nbsp;</div>\r\n<div>&nbsp;</div>",
47 "locations": [
48 "CART_PAGE"
49 ]
50 },
51 {
52 "type": "APPLIED",
53 "content": "<div>&nbsp;</div>\r\n<div>&nbsp;</div>",
54 "locations": [
55 "CART_PAGE"
56 ]
57 }
58 ],
59 "stop": false,
60 "start_date": "2019-02-01T05:00:00+00:00",
61 "status": "ENABLED"
62}

Buy three items in a category for the price of two (lowest priced item discounted)

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

Buy product X or items from category Y and get $10 off items from category Z

Example request
1{
2 "name": "Buy product X or items from category Y and get $10 off items from category Z",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "apply_once": true,
7 "condition": {
8 "cart": {
9 "items": {
10 "or": [
11 {
12 "categories": [
13 1
14 ]
15 },
16 {
17 "products": [
18 1
19 ]
20 }
21 ]
22 },
23 "minimum_quantity": 1
24 }
25 },
26 "action": {
27 "cart_items": {
28 "discount": {
29 "fixed_amount": 10
30 },
31 "items": {
32 "categories": [
33 31
34 ]
35 }
36 }
37 }
38 }
39 ]
40}

Buy three from category X, and get one from category Y free

Example request
1{
2 "name": "Buy three from category X and get one from category Y free",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "apply_once": false,
7 "condition": {
8 "cart": {
9 "items": {
10 "categories": [
11 24
12 ]
13 },
14 "minimum_quantity": 3
15 }
16 },
17 "action": {
18 "cart_items": {
19 "discount": {
20 "percentage_amount": 100
21 },
22 "items": {
23 "categories": [
24 24
25 ]
26 },
27 "quantity": 1
28 }
29 }
30 }
31 ]
32}

Spend $X from category X and get product Y free

Example request
1{
2 "name": "Buy $X from category X and get product Y free",
3 "redemption_type": "AUTOMATIC",
4 "rules": [
5 {
6 "apply_once": false,
7 "condition": {
8 "cart": {
9 "items": {
10 "categories": [
11 19
12 ]
13 },
14 "minimum_spend": 300
15 }
16 },
17 "action": {
18 "cart_items": {
19 "discount": {
20 "percentage_amount": 100
21 },
22 "items": {
23 "products": [
24 81
25 ]
26 },
27 "quantity": 1
28 }
29 }
30 }
31 ]
32}