During the last month (September 2023), I faced several times with the same situation when GET requested to order API (https://[shop name].myshopify.com/admin/api/2023-01/orders.json?..) returns status 200 and empty body. A successful response will always return JSON and an array inside.
The HTTP 200 status code indicates that the API request was successful. However, an empty response body may mean that there are no resources that match your request.
Here are some steps you can take to troubleshoot this issue:
Confirm the endpoint: Make sure youâre using the correct endpoint and API version (in your case, â2023-01â) to retrieve the orders.
Check the parameters: If youâre using parameters in your request, make sure they are correct. For example, you might be requesting orders from a specific time period where no orders were made, or using a filter that matches no orders.
Verify access: Ensure that your API key has the necessary permissions to access order data.
Test in Postman: Test your request in an API development environment like Postman to see if you get the same result.
Test out the above and let us know if it your still seeing an empty body - hope this helps!
Confirmed the correct endpoint (in my case, 2023-07).
The parameters are correct (it works in other stores, only in a specific clientâs store it doesnât).
Permissions have been checked, everything seems fine. I tested removing the permissions, and the request returned an error as expected. The problem is that itâs returning { orders: [] } and status 200 when I try to create an order.
I tested it in Postman, and the behavior was the same.
Any updates on this? I believe itâs affecting more users as well.
Once a day I automatically download all our Orders, Products, and Customers into a separate system, via the API. It has worked flawlessly for over a year. Recently, the amount of data retrieved has been smaller than usual
Testing some more, it seems that the pagination intermittently finishes early. I retrieve the URL for the next page from the Link field, call the API with that URL, then on the next call there is no body, and many of the header fields are missing, including Link (no previous URL to go to)
Iâve witnessed this with Products, Customers, Orders, and Inventory endpoints
Our store relies on the Products and Inventory to keep our Shopify inventory in-sync with our in-store inventory. Dev team please help!