Hi,
I use the Admin API for get orders from https://Preke1.lt shop.
When I request:
https://prece1-lv.myshopify.com/admin/api/2023-01/orders.json?limit=250&created_at_min=2023-03-01T00:00:00.0000000&status=any
I got response where first order has date 2023.04.03.
When I request
https://prece1-lv.myshopify.com/admin/api/2023-01/orders.json?limit=250&created_at_max=2023-04-03T00:00:00.0000000&status=any
I got response where are lot of orders until 2023.04.03.
How can I get those until 2023.04.03 orders using parameter: created_at_min?
Hi,
I use the Admin API for get orders from https://Preke1.lt shop.
When I request:
https://prece1-lv.myshopify.com/admin/api/2023-01/orders.json?limit=250&created_at_min=2023-03-01T00:00:00.0000000&status=any
I got response where first order has date 2023.04.03.
When I request
https://prece1-lv.myshopify.com/admin/api/2023-01/orders.json?limit=250&created_at_max=2023-04-03T00:00:00.0000000&status=any
I got response where are lot of orders until 2023.04.03.
How can I get those until 2023.04.03 orders using parameter: created_at_min?
1 Like
Hey @Alexjakovlev - thanks for reaching out. That is definitely odd - it should ideally pull all of the orders since that date. Can you try this call?
https://prece1-lv.myshopify.com/admin/api/2023-01/orders.json?limit=250&status=any&created_at_min=2023-03-01T00:00:00.000Z&created_at_max=2023-04-03T23:59:59.000Z
This should pull all of the orders from between those dates and may help resolve the issue temporarily. Iβm just suggesting this as a workaround for the time being - we are definitely happy to take a look into the issue further. Could you provide a recent X-Request-ID from the API response headers for an example API call where you only used the created_at_min filter and arenβt seeing the correct orders? We can use that to track down an exact API call in our logs - the API call would have had to be made in the last 10 or so days of this post though.
Hope this helps, looking forward to hearing from you.
Al | Shopify Developer Support
1 Like
Hi,
There are the two new my requests:
https://prece1-lv.myshopify.com/admin/api/2023-01/orders.json?limit=250&created_at_min=2023-04-19T00:00:00.0000000&status=any
X-Request-ID: 722a8d02-9903-4575-82ad-315aa8c0e897
I had received orders from 2023.04.20 19:38:26 and no one order for 2023.04.19.
https://prece1-lv.myshopify.com/admin/api/2023-01/orders.json?limit=250&created_at_max=2023-04-20T00:00:00.0000000&status=any
X-Request-ID: fde344ca-36c7-4071-aac5-ba2bdb58c129
I had received about 100 orders for 2023.04.19 date.
I think the solution is simple for bug fixing:
Instead SQL query:
select top 250 * from orders where created_at_min>β2023-04-19β
You need to use:
select top 250 * from orders where order desc created_at_min>β2023-04-19β
select top 250 * from orders where created_at_min>β2023-04-19β order by desc
Final sql
select top 250 * from orders where created_at_min>β2023-04-19β order by created_at_min desc