New Shopify Certification now available: Liquid Storefronts for Theme Developers

Order API not displaying all Orders

1 0 0




I am building a website where I need to grab the orders from the Shopify (so as you see above I am trying to list the orders), however, as you can see the latest ID is not the same as the ID on the latest order. However, when I go to orders.json?status=any, it shows on the json file. However, when I do the same thing in my PHP, it shows the list above. So I am just confused why I am only getting the OPEN orders when I am putting ?status=any.

Here is my PHP Code:

  $orders = shopify_call($token, $shop, "/admin/api/2020-10/orders.json?status=any", array(), 'GET');
  $orders = json_decode($orders['response'], JSON_PRETTY_PRINT);


I need that list of orders to display everything on orders.json?status=any. Appreciate any help or advice.

Reply 1 (1)
Shopify Staff
Shopify Staff
836 100 221

Hey @UnderWillows,

In order to investigate further, kindly provide the X-Request-ID value from the response headers of a call that isn't returning the expected orders. If you're unable to log this through your app, you can get the value by making the request again using your app's token and an HTTP client like Insomnia or Postman.

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit or the Shopify Web Design and Development Blog