Skip to content

Commit 295593c

Browse files
committed
feat(promotions): PROMO-1064 Add shipping discount action
1 parent c998d21 commit 295593c

File tree

2 files changed

+78
-1
lines changed

2 files changed

+78
-1
lines changed

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

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@
283283

284284
<Tabs items={['Request', 'Response']}>
285285
<Tab>
286-
286+
287287
```json filename="Example request" showLineNumbers copy
288288
{
289289
"name": "Order at least 2X of product and get free shipping",
@@ -419,3 +419,79 @@
419419

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

1415

0 commit comments

Comments
 (0)