What is possible values of query param "type" codeDiscountNodes

What is possible values of query param "type" codeDiscountNodes

bantikyan
Shopify Partner
3 0 1

Hi all, need help with codeDiscountNodes : https://shopify.dev/api/admin-graphql/2021-10/queries/codeDiscountNodes

 

Does anybody know what is possible values of query param "type"
Screenshot 2022-05-02 141439.jpg
Reply 1 (1)

Alan
Shopify Staff
129 15 25

Hey @bantikyan thanks for reaching out - great question!

I was able to touch base with some of our developers on this and they've been able to share the "type" fields that can be used as part of a query using codeDiscountNodes. The fields available for the codeDiscountNodes "type" param are "bxgy" for "Buy one Get One" discounts, "fixed_amount", "free_shipping", and "percentage". 

 

I also wanted to thank you for bringing this up to us - we'll be making some updates to our developer documents to reflect the fields that are available on the "type" param for codeDiscountNodes.

 

I can't guarantee an exact timeline on when the update to the document will go live, but I've been told that it's anticipated that "type" will become the recommended parameter to use when querying discount types using this query and that we will be considering "discount_type" a legacy param. 

 

Thanks again for getting in touch - I hope this info helps with your project. 

 

Cheers!

Alan | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog