Issue: A Python script retrieving Shopify orders intermittently returns empty or “Not Found” for certain months while the same request succeeds for others.
Details: The URL used is /admin/api/2021-07/orders.json with status=any; changing “07” to other numbers was assumed to target different months. Some 2021 months (Jan, Apr, Jul) return orders; others (e.g., Aug) do not.
Key clarification: “2021-07” in the path is the API version, not a month filter. To fetch orders by date, use created_at_min/max or updated_at_min/max query parameters (e.g., updated_at_max=2021-07-31T00:00:00-04:00). Different version paths (2021-01 vs 2021-07) will return the same data when using identical date filters.
Additional consideration: Accessing orders older than 60 days may require the read_all_orders scope in the app settings.
Outcome: The original poster still receives “Not Found” for most months after trying created_at_max. No confirmed resolution yet; troubleshooting remains open.
Action items:
Verify app scopes (read_all_orders for >60-day orders).
Use proper date range filters (created_at_min/max or updated_at_min/max).
Review Shopify API versioning and changelog for potential changes.
Note: An image illustrating quarterly API version releases is referenced but not central to the fix.
As we were writing a Python script to retrieve Orders from our online store, we faced a confusing issue.
The HTTP request works for some months only and returns an empty response for other months (using the same request). Please find below the HTTP request URL:
If we change 07 to 05 for example it doesn’t return any orders, and this happens for several other months, even though there are orders during these months.
Kindly let me know if you need further information or if I’m doing something wrong.
Are you trying to access orders made more than 60 days ago? I believe you need to request read_all_orders through your app settings to see orders over 60 days old. https://shopify.dev/api/usage/access-scopes
The 2021-07 or 2021-01 part of the URL is referencing the version of the API being requested, not the date range of the orders themselves. You’ll want to use the created_at_min/max or updated_at_min/max as parameters for requesting specific order dates.
I would also recommend following our API Changelog here: https://changelog.shopify.com/ This will let you know of any large changes to the API that might affect your app in future.