Returns a discount resource by ID.


Anchor to id
id
required

The ID of the DiscountNode to return.


Was this section helpful?

Anchor to DiscountNode
DiscountNode
Access requirements

A discount wrapper node.


Was this section helpful?
Retrieve a discount by its ID
Hide code
DescriptionCopy
query {
  discountNode(id: "gid://shopify/DiscountAutomaticNode/299501151") {
    id
    discount {
      ... on DiscountCodeBasic {
        title
      }
      ... on DiscountCodeBxgy {
        title
      }
      ... on DiscountCodeFreeShipping {
        title
      }
      ... on DiscountAutomaticApp {
        title
      }
      ... on DiscountAutomaticBasic {
        title
      }
      ... on DiscountAutomaticBxgy {
        title
      }
      ... on DiscountAutomaticFreeShipping {
        title
      }
    }
  }
}
Hide code
Response
JSON
{
  "discountNode": {
    "id": "gid://shopify/DiscountAutomaticNode/299501151",
    "discount": {
      "title": "My automatic discount"
    }
  }
}