A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I am creating an app for my client. The client already has website set up on Shopify. I want to fetch the list of discount codes and price rules that are being used on website.
The Shopify dev documentation mentions that access scopes are required for the same. However, the access scope for discount and price rules is not available explicitly anywhere in the Shopify partners account.
How to get these access scopes which help in fetching discount and price rules using the APIs given in the Shopify API documentation.
If you're using the GraphQL API - there are details here on the scopes required for managing discounts.
Specifically they're named as:
read_discounts and write_discounts access scopes.
The Price Rules are scopes used within the REST API - which might be where the confusion is coming from?
We are using Rest API. We need access scopes to fetch price rule and discounts. How can i do that?
It is not clearly given how I can get the access scopes?
Sharing an example here.
Suppose I want to retrieve a single discount code from the Shopify account. the prerequisite for that price_rules access scopes
Even to get the price rules, the price_rules access scopes is required.
When I go to the app setup option in the SHopify partners account, I have an option to request access scopes to read all orders.
I can further request access for
Subscriptions
Payment
Checkout
Post Purchase
But there is no option to request access for Discounts/Price rules. And this is where i am getting confused.
I am using the REST API. And I want to fetch the discounts and price rule. I have shared the problem i am facing above. Kindly suggest what next steps should be taken so that I will be able to fetch price rules/discounts.