Skip to content

Commit a494217

Browse files
committed
feat(promotions): PROMO-1064 Add shipping discount action
1 parent 897958a commit a494217

2 files changed

Lines changed: 79 additions & 6 deletions

File tree

docs/store-operations/promotions/examples/shipping.mdx

Lines changed: 78 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@
127127

128128
## Order at least X units of product Y and get free shipping to specific shipping zones
129129

130+
131+
130132
<Tabs items={['Request', 'Response']}>
131133
<Tab>
132134

@@ -273,17 +275,13 @@
273275
"meta": {}
274276
}
275277
```
276-
277278
</Tab>
278279
</Tabs>
279280

280281
## Order at least 2X of product and get free shipping
281282

282-
283-
284283
<Tabs items={['Request', 'Response']}>
285284
<Tab>
286-
287285
```json filename="Example request" showLineNumbers copy
288286
{
289287
"name": "Order at least 2X of product and get free shipping",
@@ -340,8 +338,6 @@
340338
}
341339
```
342340

343-
344-
345341
</Tab>
346342
<Tab>
347343
```json filename="Example response" showLineNumbers copy
@@ -419,3 +415,79 @@
419415

420416
</Tab>
421417
</Tabs>
418+
419+
##Spend at least $100 and get $10 off shipping (specific methods)
420+
421+
<Tabs items={['Request', 'Response']}>
422+
<Tab>
423+
```json filename="Example request" showLineNumbers copy
424+
{
425+
"name": "Spend at least $100 and get $10 off shipping (specific methods)",
426+
"redemption_type": "AUTOMATIC",
427+
"rules": [
428+
{
429+
"action": {
430+
"shipping_discount": {
431+
"discount": { "fixed_amount": 10 },
432+
"method_ids": [1, 3]
433+
}
434+
},
435+
"apply_once": true,
436+
"stop": false,
437+
"condition": { "cart": { "minimum_spend": 100 } }
438+
}
439+
],
440+
"notifications": [],
441+
"stop": false,
442+
"status": "ENABLED",
443+
"currency_code": "USD",
444+
"start_date": "2025-10-01T00:00:00-05:00",
445+
"end_date": null
446+
}
447+
```
448+
449+
</Tab>
450+
<Tab>
451+
```json filename="Example response" showLineNumbers copy
452+
{
453+
"data": {
454+
"id": 1,
455+
"name": "Spend at least $100 and get $10 off shipping (specific methods)",
456+
"created_from": "api",
457+
"customer": {
458+
"group_ids": [],
459+
"minimum_order_count": 0,
460+
"excluded_group_ids": [],
461+
"segments": null
462+
},
463+
"rules": [
464+
{
465+
"action": {
466+
"shipping_discount": {
467+
"discount": { "fixed_amount": "10" },
468+
"method_ids": [1, 3]
469+
}
470+
},
471+
"apply_once": true,
472+
"stop": false,
473+
"condition": { "cart": { "minimum_spend": "100" } }
474+
}
475+
],
476+
"notifications": [],
477+
"stop": false,
478+
"currency_code": "USD",
479+
"redemption_type": "AUTOMATIC",
480+
"shipping_address": null,
481+
"current_uses": 0,
482+
"max_uses": null,
483+
"start_date": "2025-10-01T05:00:00+00:00",
484+
"end_date": null,
485+
"status": "ENABLED",
486+
"schedule": null,
487+
"can_be_used_with_other_promotions": true
488+
},
489+
"meta": {}
490+
}
491+
```
492+
</Tab>
493+
</Tabs>

docs/store-operations/promotions/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Cart value **action** applies to the promotion value of the entire cart.
1010
* Gift item **action** gives a free gift item.
1111
* Fixed price set **action** applies a fixed price for a set of items.
12+
* Shipping discount **action** applies discounts to the selected shipping methods.
1213
</Callout>
1314

1415

0 commit comments

Comments
 (0)