Solved

Why isn't GET Orders API showing all updated orders?

pushpakv
Visitor
2 0 0

This is regarding Shopify Orders API , Observed that when using GET Orders API with updated_at_min query parameter, the API is not responding with all the orders updated at or after the given date.

 

Curl command below for reference.

 

curl --location --request GET 'https://<store>.myshopify.com/admin/api/2023-01/orders.json?updated_at_min=2023-07-29T14:02:31&limit=100' \ --header 'Content-Type: application/json' \ --header 'X-Shopify-Access-Token: xxxxx '

 

Please help.

Accepted Solution (1)
remy727
Shopify Partner
41 2 22

This is an accepted solution.

Adding status=any will retrieve all orders with any status(open, closed, cancelled).

But without it, only open orders will be retrieved.

Looking for a Shopify App developer? Please visit: https://github.com/remy727

View solution in original post

Replies 3 (3)

remy727
Shopify Partner
41 2 22

Try this:

curl -X GET "https://{your_store}.myshopify.com/admin/api/2023-07/orders.json?updated_at_min=2023-07-29T14%3A02%3A31" \
-H "X-Shopify-Access-Token: {access_token}"
Looking for a Shopify App developer? Please visit: https://github.com/remy727
pushpakv
Visitor
2 0 0

Even with above curl command experiencing same issue. @remy727 , I tried 2023-01 API version with another query param 'status' and value as 'any' along with 'updated_at_min' query parameter and able to retrieve all the orders.

 

Would like to know what is the difference and why with updated_at_min query parameter not all orders were retrieved.

remy727
Shopify Partner
41 2 22

This is an accepted solution.

Adding status=any will retrieve all orders with any status(open, closed, cancelled).

But without it, only open orders will be retrieved.

Looking for a Shopify App developer? Please visit: https://github.com/remy727