Discussing APIs and development related to customers, discounts, and order management.
Hello,
I'm trying to create a PriceRule via GQL. I found the relevant documentation at: https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/priceRuleCreate.
But I didn't find a description in the documentation of creating Buy X, Get Y and setting the minimum purchase amount.
I found the description of creating Buy X, Get Y and setting the minimum purchase quantity, prerequisiteToEntitlementQuantityRatio and it works fine.
I tried to use prerequisiteToEntitlementAmountRatio, but it prompted me that Field is not defined on PriceRuleInput.
Solved! Go to the solution
This is an accepted solution.
Hey @supportmay ,
I just found that there is now a dedicated gql mutation to create a buy x get y discount which support the minimum purchase amount. Please check this link: https://shopify.dev/docs/api/admin-graphql/2024-07/mutations/discountCodeBxgyCreate
This is an accepted solution.
Hey @supportmay ,
I just found that there is now a dedicated gql mutation to create a buy x get y discount which support the minimum purchase amount. Please check this link: https://shopify.dev/docs/api/admin-graphql/2024-07/mutations/discountCodeBxgyCreate