DiscountCodeNode - admin-graphql - OBJECT
Version: 2025-01
Description:
A node containing a code discount and its related events.
Access Scopes
Apps must have `read_discounts` access scope.
Fields
codeDiscount
: DiscountCode! - The underlying code discount object.
id
: ID! - A globally-unique ID.
metafield
: Metafield - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Connections
events
: EventConnection!
metafieldDefinitions
: MetafieldDefinitionConnection!
metafields
: MetafieldConnection!
Related queries
codeDiscountNode
Returns a code discount resource by ID.
codeDiscountNodeByCode
Returns a code discount identified by its discount code.
codeDiscountNodes
List of code discounts. Special fields for query params: * status: active, expired, scheduled * discount_type: bogo, fixed_amount, free_shipping, percentage.
Related mutations
discountCodeActivate
Activates a code discount.
discountCodeBasicCreate
Creates a basic code discount.
discountCodeBasicUpdate
Updates a basic code discount.
discountCodeBxgyCreate
Creates a Buy X get Y (BXGY) code discount.
discountCodeBxgyUpdate
Updates a Buy X, Get Y (BXGY) code discount.
discountCodeDeactivate
Deactivates a code discount.
discountCodeFreeShippingCreate
Creates a free shipping code discount.
discountCodeFreeShippingUpdate
Updates a free shipping code discount.
Related Unions
MetafieldReferencer
Types of resources that may use metafields to reference other resources.
Examples