Information about the intent of a discount.
To learn about how to display discounts in your theme, refer to Discounts.
Properties | Type | Description |
---|
discount_amount | number | The amount of discount. |
discount_id | string | The id of discount. |
discount_message | string | The message of discount. |
discount_type | string | The type of discount. |
entitled_product_list | array | Products with discount. |
icon | string | The icon URL of the discount. |
is_free_gift | boolean | Returns true if the discount product is free gift. Returns false if not. |
message | string | The message of discount. |
subtype | string from a set of values, refer to subtype values | The subtype of discount. |
target_selection | string from a set of values, refer to target_selection values | The selection method for line items or shipping lines is to be discounted.
Whether the selection method applies to line items or shipping lines depends on the discount's target_type . |
target_type | string from a set of values, refer to target_type values | The type of item that the discount applies to. |
title | string | The title of discount. |
type | string from a set of values, refer to type values | The type of discount. |
value_type | string from a set of values, refer to value_type values | The value type of the discount. |
Possible values |
---|
automatic |
discount_code |
discount_coupon |
discount_flashsale |
discount_rebate |
Possible values |
---|
automatic |
buy_x_get_y |
discount_code |
discount_coupon |
discount_flashsale |
discount_rebate |
Possible values |
---|
percentage |
fixed_amount |
buy_x_get_y |
fixed_price |
Possible values |
---|
line_item |
shipping_line |
Possible values | Description |
---|
all | The discount applies to all line items or shipping lines. |
entitled | The discount applies to specific line items or shipping lines based on some criteria. |
explicit | The discount applies to a specific line item or shipping line. |
{
"type": "discount_rebate",
"subtype": "discount_rebate",
"title": "满减",
"discount_amount": 20,
"message": "",
"discount_message": "",
"discount_id": "53b13206-6de7-48dd-baa5-a542f5be26f5",
"value_type": "fixed_amount",
"target_type": "line_item",
"apply_method": "",
"target_selection": "entitled",
"discount_type": "discount_rebate",
"entitled_product_list": [
{
"product_id": "b1ab6324-ae4f-4cca-907e-18af16839447",
"variant_id": "4a3d825c-2fac-4f72-a68b-b8604b0935c4",
"price": "205.2",
"quantity": 1
}
],
"icon": "//cdn.shoplazza.com/oss/operation/52a3d7f0a272be85092170dc93eefe81.svg"
}