We are successfully getting orders from shopify api for status as open, closed and any. Now while fetching cancelled orders from shopify api it returns no orders in response but cancelled orders are available on shopify admin portal.
Api's tried to get cancelled orders
If I query the API via /orders.json?status=cancelled on my store I am returned orders in which the cancelled_at field is not null and has a timestamp.
Would you mind sharing an x-request_id from the headers when you make this call and we can take a look into things - thanks!
I took a look into this for you. Checking the database, the store has cancelled orders. However these orders were created over 60 days ago.
Checking out the app you made this call with to orders.json, your app does not have access to more than the last 60 days of orders on the store.
You can get access to these orders by applying for the read_all_orders scope. It can be requested from within the app in the partner dashboard and will go through an approval process. Check out the docs here for further info. Once that scope is approved, I would then try the call again. You'd be able to get all the orders for the other calls you are making too with that scope.
I also edited this post as you shared your secret key there, I removed it. Just a friendly reminder to keep your credentials secure - I'd recommend rotating your API access credentials to ensure security of your app. Hope that all helps!