Solved

Fetch orders for a specific day

albertojsm
Tourist
4 0 1

How could i fetch orders that has been created in a specific day?.

 

I need to fetch only 1 specific day, by example , all orders from  August 23.

 

https://shop-name-here.myshopify.com/admin/api/2022-07/orders.json?status=any&created_at_min=2022-08... -> response , an empty array.

 

https://shop-name-here.myshopify.com/admin/api/2022-07/orders.json?status=any&created_at_min=2022-08...4 -> response , all orders between 23 and 24.

 

Thxs

 

Accepted Solutions (2)

m8th
Shopify Partner
13 5 11

This is an accepted solution.

Hi

 

You must define the timestamp according to the format as in the documentation.

 

For example: 

2022-08-25T07:48:59+00:00

 

Ref.

RTFM!

View solution in original post

m8th
Shopify Partner
13 5 11

This is an accepted solution.

created_at_min must be lower than created_at_max

 

example

https://shop-name-here.myshopify.com/admin/api/2022-04/orders.json?status=any&created_at_min=2022-08-22T21:59:59+02:00&created_at_max=2022-08-23T22:00:00+02:00
RTFM!

View solution in original post

Replies 5 (5)

m8th
Shopify Partner
13 5 11

This is an accepted solution.

Hi

 

You must define the timestamp according to the format as in the documentation.

 

For example: 

2022-08-25T07:48:59+00:00

 

Ref.

RTFM!
albertojsm
Tourist
4 0 1

That should do the trick, thxs.

albertojsm
Tourist
4 0 1

          

m8th
Shopify Partner
13 5 11

This is an accepted solution.

created_at_min must be lower than created_at_max

 

example

https://shop-name-here.myshopify.com/admin/api/2022-04/orders.json?status=any&created_at_min=2022-08-22T21:59:59+02:00&created_at_max=2022-08-23T22:00:00+02:00
RTFM!
albertojsm
Tourist
4 0 1

yep, you are right, i saw it after posting.

 

thx for your help.