discount_application

Information about the intent of a discount.

To learn about how to display discounts in your theme, refer to Discounts.

PropertiesTypeDescription
discount_amountnumberThe amount of discount.
discount_idstringThe id of discount.
discount_messagestringThe message of discount.
discount_typestringThe type of discount.
entitled_product_listarrayProducts with discount.
iconstringThe icon URL of the discount.
is_free_giftbooleanReturns true if the discount product is free gift. Returns false if not.
messagestringThe message of discount.
subtypestring from a set of values, refer to subtype valuesThe subtype of discount.
target_selectionstring from a set of values, refer to target_selection valuesThe 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_typestring from a set of values, refer to target_type valuesThe type of item that the discount applies to.
titlestringThe title of discount.
typestring from a set of values, refer to type valuesThe type of discount.
value_typestring from a set of values, refer to value_type valuesThe value type of the discount.

type values

Possible values
automatic
discount_code
discount_coupon
discount_flashsale
discount_rebate

subtype values

Possible values
automatic
buy_x_get_y
discount_code
discount_coupon
discount_flashsale
discount_rebate

value_type values

Possible values
percentage
fixed_amount
buy_x_get_y
fixed_price

target_type values

Possible values
line_item
shipping_line

target_selection values

Possible valuesDescription
allThe discount applies to all line items or shipping lines.
entitledThe discount applies to specific line items or shipping lines based on some criteria.
explicitThe 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"
}