API to show customer discount on their profile page?

AI-generated summary

Goal: build an embedded Shopify app that displays any discount codes associated with a customer on their profile page.

  • Approach considered: using the Storefront API (Shopify’s customer-facing GraphQL API) and inspecting GraphiQL schemas.
  • Objects checked: Customer and DiscountNode (GraphQL types) were reviewed, but no properties were found to retrieve discount codes tied to a specific customer.
  • Clarification sought: whether discount retrieval per customer exists in the Storefront API, or if the capability is currently unavailable/located elsewhere.

Key terms:

  • Storefront API: Shopify’s GraphQL API for storefront interactions (e.g., customers, products, orders).
  • GraphiQL: an IDE for exploring and querying GraphQL schemas.
  • Customer, DiscountNode: GraphQL objects representing customer data and discount entities.

Status: open question; no confirmed method or resolution provided yet.

I’d like to build an embedded app that shows any discount codes a customer has on their profile page.

I believe I’d need the Storefront API for this, but looking through the Customer and DiscountNode objects in GraphiQL, I can’t see any properties that let me retrieve discount codes for a customer. Am I looking in the wrong place, or is this currently not available?

Thanks in advance for any help.