All things Shopify and commerce
Hi.
I would expect the result dates to be ASC not DESC.
x-request-id: 5abc038a-49d5-4720-bc44-2507827dfb9d-1726550207
/admin/api/2024-07/customers.json?limit=3&fields=id,created_at&created_at_min=2019-09-11T12:50:03-07:00
Result:
[customers] => Array ( [0] => Array ( [id] => 6541824000035 [created_at] => 2024-09-11T13:13:27-07:00 ) [1] => Array ( [id] => 6541767147555 [created_at] => 2024-09-11T12:52:53-07:00 ) [2] => Array ( [id] => 6541758529571 [created_at] => 2024-09-11T12:50:03-07:00 ) )
Notice the created_at is 2024?
There are customers since 2019.
Why is it returning the most recent when it specifies min?
Why is there no "order_by" (ASC/DESC).
Regards.
Solved! Go to the solution
This is an accepted solution.
I figured it out.
/admin/api/2024-07/customers.json?limit=3&fields=id,created_at&created_at_min=2019-09-11T12:50:03-07:00&order=created_at+asc
You can use "order" with (id, created_at, updated_at, processed_at) (space) "+" and (asc/desc)
Hope this helps someone else.
This is an accepted solution.
I figured it out.
/admin/api/2024-07/customers.json?limit=3&fields=id,created_at&created_at_min=2019-09-11T12:50:03-07:00&order=created_at+asc
You can use "order" with (id, created_at, updated_at, processed_at) (space) "+" and (asc/desc)
Hope this helps someone else.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025