Discount Code
Requires Apps must have access scope.
The type of discount associated with the discount code. For example, the discount code might offer a basic discount of a fixed percentage, or a fixed amount, on specific products or the order. Alternatively, the discount might offer the customer free shipping on their order. A third option is a Buy X, Get Y (BXGY) discount, which offers a customer discounts on select products if they add a specific product to their order.
Anchor to Possible typesPossible types
- DiscountCodeApp (DiscountCodeApp)
- DiscountCodeBasic (DiscountCodeBasic)
- DiscountCodeBxgy (DiscountCodeBxgy)
- DiscountCodeFreeShipping (DiscountCodeFreeShipping)
- •OBJECT
The
object stores information about code discounts that are managed by an app using Shopify Functions. Usewhen you need advanced, custom, or dynamic discount capabilities that aren't supported by Shopify's native discount types.Learn more about creating custom discount functionality.
NoteNote: The <a href="https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticApp"><code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Automatic<wbr/>App</span></code></a> object has similar functionality to the <code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Code<wbr/>App</span></code> object, with the exception that <code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Automatic<wbr/>App</span></code> stores information about automatic discounts that are managed by an app using Shopify Functions.
- •OBJECT
The
object lets you manage amount off discounts that are applied on a cart and at checkout when a customer enters a code. Amount off discounts give customers a fixed value or a percentage off the products in an order, but don't apply to shipping costs.The
object stores information about amount off code discounts that apply to specific products and variants, collections, or all items in a cart.Learn more about working with Shopify's discount model, including limitations and considerations.
NoteNote: The <a href="https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic"><code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Automatic<wbr/>Basic</span></code></a> object has similar functionality to the <code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Code<wbr/>Basic</span></code> object, but discounts are automatically applied, without the need for customers to enter a code.
- •OBJECT
The
object lets you manage buy X get Y discounts (BXGY) that are applied on a cart and at checkout when a customer enters a code. BXGY discounts incentivize customers by offering them additional items at a discounted price or for free when they purchase a specified quantity of items.The
object stores information about BXGY code discounts that apply to specific products and variants, collections, or all items in a cart.Learn more about working with Shopify's discount model, including limitations and considerations.
NoteNote: The <a href="https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBxgy"><code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Automatic<wbr/>Bxgy</span></code></a> object has similar functionality to the <code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Code<wbr/>Bxgy</span></code> object, but discounts are automatically applied, without the need for customers to enter a code.
- •OBJECT
The
object lets you manage free shipping discounts that are applied on a cart and at checkout when a customer enters a code. Free shipping discounts are promotional deals that merchants offer to customers to waive shipping costs and encourage online purchases.The
object stores information about free shipping code discounts that apply to specific products and variants, collections, or all items in a cart.Learn more about working with Shopify's discount model, including limitations and considerations.
NoteNote: The <a href="https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping"><code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Automatic<wbr/>Free<wbr/>Shipping</span></code></a> object has similar functionality to the <code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Code<wbr/>Free<wbr/>Shipping</span></code> object, but discounts are automatically applied, without the need for customers to enter a code.
Anchor to Fields with this unionFields with this union
- •OBJECT
The
object enables you to manage code discounts that are applied when customers enter a code at checkout. For example, you can offer discounts where customers have to enter a code to redeem an amount off discount on products, variants, or collections in a store. Or, you can offer discounts where customers have to enter a code to get free shipping. Merchants can create and share discount codes individually with customers.Learn more about working with Shopify's discount model, including related queries, mutations, limitations, and considerations.