Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
Solved

How to search codeDiscountNode by code

ko-lem
Shopify Partner
13 0 6

This GraphQL query https://shopify.dev/docs/api/admin-graphql/2023-07/queries/codeDiscountNodes can be provided with a query string that can search the title but I want to search the actual discount codes.

 

This GraphQL query https://shopify.dev/docs/api/admin-graphql/2023-07/queries/codeDiscountNodeByCode can be given the actual discount code, so I can already retrieve the codeDiscountNode that has discount code "CHOCO155".

 

But how can I retrieve all codeDiscountNodes that has a discount code that starts with "CHOCO"

Accepted Solution (1)

SBD_
Shopify Staff
1776 263 383

This is an accepted solution.

Hey @ko-lem 

 

That's not possible with the current version of the API - passing along your feedback.

Scott | Developer Advocate @ Shopify 

View solution in original post

Replies 2 (2)

SBD_
Shopify Staff
1776 263 383

This is an accepted solution.

Hey @ko-lem 

 

That's not possible with the current version of the API - passing along your feedback.

Scott | Developer Advocate @ Shopify 

ko-lem
Shopify Partner
13 0 6

Okay, thanks!