Discount Code Sort Keys
The set of valid sort keys for the DiscountCode query.
Anchor to Valid valuesValid values
- CODE
- CREATED_AT
- ID
- RELEVANCE
- Anchor to CODECODE
Sort by the
codevalue.- Anchor to CREATED_ATCREATED_
AT Sort by the
value.Sort by the
idvalue.- Anchor to RELEVANCERELEVANCE
Sort by relevance to the search terms when the
queryparameter is specified on the connection. Don't use this sort key when no search query is specified.
Anchor to FieldsFields
- •ARGUMENT
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.
- •ARGUMENT
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.
- •ARGUMENT
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.
- •ARGUMENT
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.
- •ARGUMENT
A set of conditions, including entitlements and prerequisites, that must be met for a discount code to apply.
NoteUse the types and queries included our discount tutorials instead. These will replace the GraphQL Admin API's
object andunion, and the REST Admin API's deprecatedresource.Note:Use the types and queries included our discount tutorials instead. These will replace the GraphQL Admin API's
object andunion, and the REST Admin API's deprecatedresource.Note: Use the types and queries included our <a href="https://shopify.dev/docs/apps/selling-strategies/discounts/getting-started">discount tutorials</a> instead. These will replace the GraphQL Admin API's <a href="https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceRule"><code><span class="PreventFireFoxApplyingGapToWBR">Price<wbr/>Rule</span></code></a> object and <a href="https://shopify.dev/docs/api/admin-graphql/latest/unions/DiscountCode"><code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Code</span></code></a> union, and the REST Admin API's deprecated<a href="https://shopify.dev/docs/api/admin-rest/unstable/resources/pricerule"><code><span class="PreventFireFoxApplyingGapToWBR">Price<wbr/>Rule</span></code></a> resource.
- Anchor to QueryRoot.discountRedeemCodeSavedSearches(sortKey)Query•ARGUMENT
Root.discountRedeemCodeSavedSearches(sortKey) The schema's entry-point for queries. This acts as the public, top-level API from which all queries must start.