Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions reference/promotions.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1089,13 +1089,17 @@ components:
percentage_amount:
type: string
description: The amount of discount (percentage off) to apply.
maximum_allowed_discount_amount:
$ref: '#/components/schemas/MaximumAllowedDiscountAmount'
Comment on lines +1092 to +1093
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
maximum_allowed_discount_amount:
$ref: '#/components/schemas/MaximumAllowedDiscountAmount'
maximum_allowed_discount_amount:
$ref: '#/components/schemas/Money'
description: The maximum monetary value ....

description: '**Percentage Discount**'
FixedDiscount:
title: Fixed Discount
type: object
properties:
fixed_amount:
$ref: '#/components/schemas/Money'
maximum_allowed_discount_amount:
$ref: '#/components/schemas/MaximumAllowedDiscountAmount'
description: '**Fixed Discount**'
Money:
title: Money
Expand All @@ -1105,6 +1109,14 @@ components:
**Money**
Represents a monetary value in the store’s default currency.
example: '12.95'
MaximumAllowedDiscountAmount:
pattern: '[0-9]+(\.[0-9]+)?'
type: string
description: The maximum monetary value that can be applied as a discount. The application of this maximum depends on the discount type`:`
Discount on shipping`:` Maximum discount total applies to ALL shipping destinations combined. Maximum total is divide evenly amongst all shipping destinations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably can make this PR based on Jasper's PR for shipping discount: #1100 so we can show the proof for shipping discount as well ?

Discount on products`:` Maximum discount total applies to ALL products combined. Maximum total is divided based on existing weighting logic amongst all products.
Discount on order subtotal`:` Maximum discount total applies to entire order total.
example: '10.50'
OptionalCursorCollectionMeta:
title: Collection Meta
type: object
Expand Down Expand Up @@ -1901,8 +1913,8 @@ components:
data:
- id: 1
redemption_type: AUTOMATIC
name: Buy Product X Get Free Shipping
display_name: WOW!!! FREE SHIPPING for Product X
name: Buy Product worth X Get Y% off upto Z
display_name: Shop for X and get Y% off upto Z
created_from: api
channels:
- id: 1
Expand All @@ -1923,7 +1935,7 @@ components:
- action:
cart_value:
discount:
fixed_amount: '12.95'
percentage_amount: '10'
apply_once: true
stop: true
condition:
Expand All @@ -1933,7 +1945,7 @@ components:
- 1
- 2
- 3
minimum_spend: '12.95'
minimum_spend: '100.00'
minimum_quantity: 1
current_uses: 2
max_uses: 10
Expand All @@ -1944,7 +1956,7 @@ components:
can_be_used_with_other_promotions: false
currency_code: USD
notifications:
- content: Congratulations! Youʼve received a free %ACTION.FREE_PRODUCT%
- content: Get 10% off on orders over $100 containing Brand A, B or C products.
type: UPSELL
locations:
- HOME_PAGE
Expand Down