Returns a code discount resource by ID.


Anchor to id
id
required

The ID of the DiscountCodeNode to return.


Was this section helpful?

Anchor to DiscountCodeNode
DiscountCodeNode
Access requirements

A node containing a code discount and its related events.


Was this section helpful?
Retrieve a code discount by its ID
Hide code
DescriptionCopy
query {
  codeDiscountNode(id: "gid://shopify/DiscountCodeNode/206265824") {
    id
    codeDiscount {
      ... on DiscountCodeBasic {
        title
        summary
      }
    }
  }
}
Hide code
Response
JSON
{
  "codeDiscountNode": {
    "id": "gid://shopify/DiscountCodeNode/206265824",
    "codeDiscount": {
      "title": "percentage_off_code",
      "summary": "10% off one-time purchase products"
    }
  }
}