Skip to main content
Returns everything about how one discount is set up. That means: which products, variants or collections it covers; the cart subtotal or item quantity it needs; the customer tags, segments, markets and locations it is limited to; the purchase type; its start and end dates; and what it actually gives — a percentage or amount off, a free gift, free or discounted shipping, or a tier ladder. Plus how it combines with other Shopify discounts.
Tool name: shopify_discount_get · Previously: get_discount · Read-only

When to use it

Two situations. Explaining a discount. This is what answers “how is this offer set up?” and “why isn’t my discount applying at checkout?” — the conditions it returns are precisely what a cart has to satisfy. Before editing one. Draft a discount and Create in test mode both take a patch that gets merged onto this configuration. You cannot safely change a field without first knowing what it currently is. Read, then patch.

Parameters

What comes back

config is the full stored rule as an object. template is the important one for editing — the saved discount’s template decides which fields you are allowed to change, regardless of what you send.

Errors

Things people ask that land here

  • “Why isn’t my free shipping discount applying?”
  • “What products does the summer sale cover?”
  • “What’s the minimum spend on my tiered discount?”
  • “Show me the current end date before you extend it.”

Limits

  • Setup only. No revenue, no orders, no customer records.
  • If a merchant configured a discount with something personal in it — a customer segment, an email condition — that comes back, because it is part of the discount.