"Not found" when retrieving an order via API

Topic summary

Issue: API returns 404 Not Found when fetching a known existing Shopify order. Token has read_orders but not read_all_orders; the order is older than 60 days.

Key points:

  • read_orders only grants access to the last 60 days of orders for public/custom apps. Accessing older orders requires read_all_orders.
  • Private apps can access the entire order history by default; suggested as a quick way to confirm the scope-related cause.

Shopify staff confirmation and steps:

  • For public/custom apps, you need both: (1) the read_all_orders app scope (approved via Partner Dashboard) and (2) the read_all_orders OAuth scope added to the app.
  • The provided request ID was checked; the token lacks read_all_orders, explaining the 404.
  • Follow the OAuth process after app-scope approval to include read_all_orders.

Status/next actions:

  • Not resolved in-thread; action is to request read_all_orders app scope, add the OAuth scope, and retry. Alternatively, test with a private app to verify.
  • A participant notes they don’t see read_all_orders in their scopes (API version 2023-01), an open question with no reply yet.
Summarized with AI on January 21. AI used: gpt-5.

Dear Community,

we have a problem getting a specific order via API. The response is a 404 Not Found, although the order I request is existing and can normally be opened in the Shopify Admin. My best guess till now is, that the X-Shopify-Access-Token we use doesn’t has an access scope for retrieving orders older than 60 days, but I’m not sure, beacuse I would expect a different HTTP response code. The oauth/access_scopes.json endpoint has only the read_orders scope, but not read_all_orders and the order is older than 60 days.

Is there a way, to verify my guess? A X-Request-ID from a failing request is c6cb0018-49e8-47bc-bd97-053457242406

Maybe this info helps too identifying the problem: The Access-Token is from a public app.

Many Greetings,

Tom Freudenreich

Hi!

If I’m not mistaken you can access older orders by default using a private app, so you can confirm your guess by creating a little private app with read_access on orders and try to access the order you want with it.

1 Like

Hey @tommydev

I can confirm @vicvans20 's thinking here (thanks!). Yes, Private apps will have access to the entire order history of a shop.

Also - for public and custom apps, that have the read_orders or write_orders scope, there’s an additional two scopes if you wish to read more than the 60 days - these scopes are read_all_orders app scope and the read_all_orders Oauth scopes.

Partners can request read_all_orders app scope through the partner dashboard app set up section to be approved by the Partner Support team. Once that part of the process is approved, read_all_orders OAuth scope must be added to the app.

I checked out that Request ID provided, you don’t have the read_all_orders OAuth scope - I’d recommend following the OAuth process as detailed here to get that. Hope that helps!

2 Likes

Hi Luke, having the same issue, however when I look at my scopes, I do not see “read_all_orders”. Using 2023-01