Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Orders API using updated_at_min and updated_at_max returning incomplete data

Solved

Orders API using updated_at_min and updated_at_max returning incomplete data

mark_tang
Tourist
6 2 0

The parameters updated_at_min and updated_at_max do not allow me to get all the orders that have been updated in that time period.

 

For example, firstly I called this API to check the updated_at date of a specific order which was refunded 5 months after its created_at date:

/admin/api/2021-10/orders/3886081409093.json
The result shows its updated_at field is "2021-12-22T00:23:57-08:00" and its created_at field is
"2021-07-17T10:40:26-07:00".
 
Then I called this API to retrieve the orders updated between 2021-12-21 and 2021-12-23:
/admin/api/2021-10/orders.json?updated_at_min=2021-12-21T00:00:00-08:00&updated_at_max=2021-12-23T00:00:00-08:00&limit=250
The results (no pagination) do not include the order of id 3886081409093.
 
Finally I narrowed the duration to 1 hour:
/admin/api/2021-10/orders.json?updated_at_min=2021-12-22T00:00:00-08:00&updated_at_max=2021-12-22T01:00:00-08:00
The results (no pagination) do not include that order.
Accepted Solution (1)

mark_tang
Tourist
6 2 0

This is an accepted solution.

Oh what a stupid miss. I noticed that I didn't add the status=any parameter.

View solution in original post

Reply 1 (1)

mark_tang
Tourist
6 2 0

This is an accepted solution.

Oh what a stupid miss. I noticed that I didn't add the status=any parameter.