Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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.
X-Stats-ApiClientId:3879321
Server:cloudflare
X-Request-ID:6e165ff5-d708-4f4d-9f2b-fd7f4f8de4d9
X-Shopify-Stage:production
Server-Timing:cfRequestDuration;dur=8032.999992
X-ShopId:10691900
X-Permitted-Cross-Domain-Policies:none
HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT:1/400
X-Stats-ApiPermissionId:312679825492
Could you please fix it?
Hi AlexeySergeev,
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!
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
1) In API documentation there is no sign that empty body can be returned and it can be treated as the correct response
2) I repeated the response and got a non-empty array of orders!
If it helps response header X-Request-ID value is 33b1210b-c67c-4ce2-b6c9-eab274019e49
Could you please fix the problem?
@AlexeySergeev did you manage to solve the issue? I'm experiencing the same response in version 2023-07.
I'm facing the same issue.
Any updates on this? I believe it's affecting more users as well.
X-Request-ID: 4a8bfd19-d580-47bd-b2c7-7a3d396e0913
I believe I'm facing the same issue.
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!
I also created another post about this with some more detail, and am currently waiting to hear back from support
I know this post is over a year old, but I found when you pass in "status=any" to your GET requests, records are returned.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024