order for specific date range

Solved
Senthilkumar
New Member
1 0 0
We are getting the count from the API for a particular date range. When we use the same date range to get the order details, we are not getting any data. Can you please help us with this ASAP ?
0 Likes
Greg_Kujawa
Shopify Partner
1016 83 238

If you search this forum area you will see there are quite a few questions and issues regarding pulling from this REST API endpoint over a date/time stamp range. Perhaps try the GraphQL API and see if the results are what you'd expect. I do recall there being some issues in terms of the actual time portion of the query parameter not being honored. When I was testing things I would change the logic to cover an entire 24-hour period. So the time portion would be basically ignored. Then the expected results would be there. Just up to the API consumer to iterate through the result set and parse out what's needed and what isn't.

Below is a screen shot of my using the GraphiQL app to query all orders updated since 2020-12-02T17:08:00Z. The result set includes an order that was updated prior to this minimum criteria. Which doesn't make sense...lol.

Untitled.png 

 

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 238

This is an accepted solution.

Although using the REST API, when I made a similar request for the count as well as for the order set, both came back with a single order. Which would be expected. See below. My suspicion is still along the lines of the time portion of the query parameters. Either the configured shop timezone versus the query parameter's timezone, or else some API endpoints not properly honoring what's being requested when parsing the query parameters.

Another caveat I believe involves the status=any when requesting orders via the REST API, so that you get any/all orders.

Untitled.pngUntitled2.png