Trouble getting customer orders via the storefront api

ranger73
Visitor
3 0 0

Hello, I am trying to offer order history to the users of this eCommerce site, and I noticed whenever information is filled out in the checkout process (via the checkout.webUrl address), a "customer" is automatically created in the shopify portal with all of that information. I was wondering if it is possible to query orders for this "customer" that is created via the checkout to show order history? In the documentation that I have found, it says i need to send over their username and password to recieve an access token to then query the orders for this customer, but since the customer in shopify was automatically generated, they do not have a username or password. I was wondering if it was possible to queries these orders, or if i need to make them create a username and password to do this

Replies 3 (3)
csam
Shopify Staff (Retired)
Shopify Staff (Retired)
267 40 49

Hi @ranger73 

Customer orders are not available via this API. The Storefront API itself is unauthenticated, meaning all users have read-only access, with no username or password required. The customer orders *can* be displayed via a native Shopify theme, but not with the Storefront API. 

To learn more visit the Shopify Help Center or the Community Blog.

ranger73
Visitor
3 0 0

Thank you for your reply, I am also using shopify-buy to grab live inventory, would that be possible with the shopify-buy SDK? 

ranger73
Visitor
3 0 0

Also, here I found somebody explaining how to get customer orders, but it looks like i may need to create shopify accounts on my frontend for it to be possible https://community.shopify.com/c/Shopify-APIs-and-SDKs/Can-I-access-orders-customers-fulfillmentinfo-...