Solved

How to search codeDiscountNode by code

ko-lem
Shopify Partner
15 0 7

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
1829 270 412

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
1829 270 412

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
15 0 7

Okay, thanks!