I’m using the customer accounts API on my hydrogen site to query orders, and I’m noticing weirdly that it’s not fetching orders past some cutoff date — something like a month or so. I can get orders from this past week or month, but not from December last year.
Using a fairly barebones call to minimize any potential issues, and I’m testing via a 3rd party API tester with the access token I get from the getAccessToken function when logged in.
{
customer {
orders(first: 100) {
nodes {
id
}
}
}
}
HI @Allen_Jiang
Does your app only have access to data from the last 60 days
I’m not sure. To clarify though, I’m not building an app – this is my storefront using Shopify Hydrogen, so the access token generation and everything seems to be a separate place in the admin panel to configure. The permissions settings for the customer accounts api only show enabling/disabling permissions, but not a time frame.
By default, you have access to the last 60 days’ worth of orders for a store. To access all the orders, you need to request access to the read_all_orders
scope, more info on that here: Shopify API access scopes
Hmm, I’ve been on this page before, but this seems to apply to apps being created on the partners dashboard. hydrogen storefronts are not apps that appear on the partners dashboard and don’t seem to be configured the same way.
The relevant section for me on this page is the Customer access scopes section: Shopify API access scopes
And it does not say anything about configuring to use the read_all_orders scope or how I can do this.