# HTTP Request (API, Orders)

**URL:** <https://community.shopify.com/t/http-request-api-orders/60982>\
**Category:** Customers Discounts And Orders\
**Created:** [August 23, 2021, 8:31am UTC](https://community.shopify.com/t/http-request-api-orders/60982 "2021-08-23T08:31:11Z")\
**Posts on this page:** 6\
**Page:** 1

## AI-generated summary

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.

<div class="post-metadata">

**Author:** ![Moussa1997](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@Moussa1997](https://community.shopify.com/u/Moussa1997)\
**Post date:** [August 23, 2021, 8:31am UTC](https://community.shopify.com/t/http-request-api-orders/60982/1 "2021-08-23T08:31:11Z")

</div>

Dear Shopify Developers & Experts,

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:

url = f’https://{api\_key}:{password}@myOnlineStore.com/admin/api/2021-07/orders.json&status=any’

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.

Thank you in advance.

Youssef

---

<div class="post-metadata">

**Author:** ![stephenJCA](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@stephenJCA](https://community.shopify.com/u/stephenJCA)\
**Post date:** [August 23, 2021, 6:39pm UTC](https://community.shopify.com/t/http-request-api-orders/60982/2 "2021-08-23T18:39:27Z")

</div>

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](https://shopify.dev/api/usage/access-scopes)

---

<div class="post-metadata">

**Author:** ![Moussa1997](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@Moussa1997](https://community.shopify.com/u/Moussa1997)\
**Post date:** [August 24, 2021, 1:26pm UTC](https://community.shopify.com/t/http-request-api-orders/60982/3 "2021-08-24T13:26:17Z")

</div>

I don’t think this is the issue since we were able to get orders from July 2021 but not August 2021 AND we also got orders from some of 2020’s months.

---

<div class="post-metadata">

**Author:** ![csam](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/csam/32/379981_2.png) [@csam](https://community.shopify.com/u/csam)\
**Post date:** [August 25, 2021, 10:25pm UTC](https://community.shopify.com/t/http-request-api-orders/60982/4 "2021-08-25T22:25:54Z")

</div>

Hi @Moussa1997

If you try doing something like

```auto
/admin/api/2021-01/orders.json?created_at_max=2021-06-31T15:57:11-04:00

```

Are you able to see older orders?

You can see more examples of different order request on our Docs page here: [https://shopify.dev/api/admin/rest/reference/orders/order](https://shopify.dev/api/admin/rest/reference/orders/order)

---

<div class="post-metadata">

**Author:** ![Moussa1997](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@Moussa1997](https://community.shopify.com/u/Moussa1997)\
**Post date:** [August 26, 2021, 7:48am UTC](https://community.shopify.com/t/http-request-api-orders/60982/5 "2021-08-26T07:48:04Z")

</div>

Hi @csam ,

thank you for your reply. Yes, I did and unfortunately, I’m still getting the same error:

```auto
{'errors': 'Not Found'}

```

In 2021, only Jan, April & July return the orders. However, all the other months return the same response mentioned above.

I really don’t know the reason behind this inconsistency, I also tried using **status=any** , **created\_at\_max** as you suggested but it’s still not working.

---

<div class="post-metadata">

**Author:** ![csam](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/csam/32/379981_2.png) [@csam](https://community.shopify.com/u/csam)\
**Post date:** [August 26, 2021, 6:56pm UTC](https://community.shopify.com/t/http-request-api-orders/60982/6 "2021-08-26T18:56:52Z")

</div>

Hi @Moussa1997

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.

So, for example:

```auto
/admin/api/2021-01/orders.json?updated_at_max=2021-07-31T00:00:00-04:00

```

and

```auto
/admin/api/2021-07/orders.json?updated_at_max=2021-07-31T00:00:00-04:00

```

Are requesting the same information, but they are requesting different versions of the API.

Our API releases a new version each quarter:

 ![21-08-stvyz-twtw8](https://canada1.discourse-cdn.com/shopifyforum/original/3X/8/9/899431c49350c16829c2fd490156b07c3bb19c06.png)

You can read more about our versioning system here: [https://shopify.dev/api/usage/versioning](https://shopify.dev/api/usage/versioning)

I would also recommend following our API Changelog here: [https://changelog.shopify.com/](https://changelog.shopify.com/) This will let you know of any large changes to the API that might affect your app in future.
