read_all_orders Permission Not Behaving As Expected

sherpabot
Shopify Partner
16 0 2

Hello Team,

I have encountered some issues with my Shopify app and would appreciate some assistance from the community. Here are the details:

  1. I'm trying to extract all order data using the "read_all_orders" scope with my public app. However, when querying the orders, I'm getting 0 results. Inside my shopify.app.toml file I have these scopes:

    scopes = "read_all_orders,read_products,read_orders,write_orders,read_customers,write_customers,write_discounts"

    Additionally, the access has been granted by Shopify via App Settings > Request Access to Orders > 60 Days.
    This is the result from my postman:

    "orders": []

     with a 200 status.

  2. When attempting to fetch orders specific to a customer, both the SDK and API are returning an empty list in the response. I have verified the correct endpoint and API version, as well as the customer ID used for filtering. Only when the order is recently created am I able to retrieve orders with the same access token from the customers' last_order_id. Any insights into why the orders are not being fetched for this customer?
    Here is the result: 

    {
        "errors": "Not Found"
    }

    with a 404 status. 

  3. I noticed that the documentation for the Order resource states that only the last 60 days' worth of orders is accessible by default. To access orders beyond this timeframe, developers need to request the "read_all_orders" scope from both Shopify and the merchant. I have followed the documentation and followed oAuth for several test stores after pushing to my Heroku. The scopes are inside my GitHub as well and are in the permissions section of the app when installed or inside the apps' information section. 

 

I am using the admin API with this resource: https://shopify.dev/docs/api/admin-rest/2023-04/resources/order. I also would like to note the orders for the test store were created via API greater than 60 days ago. I did try using graphql with similar results (or lack there of). 

I would greatly appreciate any guidance or suggestions to resolve these issues. Thank you in advance for your help.

Best regards. 

Reply 1 (1)

sherpabot
Shopify Partner
16 0 2

BUMP