Price Rule and Discount Access Scopes

Price Rule and Discount Access Scopes

SushantSomkuwar
Visitor
3 0 1

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. 

Replies 2 (2)

SB_90
Shopify Partner
216 52 70

 

Hi @SushantSomkuwar 

 

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?

SushantSomkuwar
Visitor
3 0 1

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

SushantSomkuwar_0-1676635362290.png

Even to get the price rules, the price_rules access scopes is required. 

SushantSomkuwar_1-1676635425698.png

 

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.