Getting started with the Storefront API
The Storefront API provides unauthenticated access to products, collections, customers, checkouts, and other store resources that you can use to build custom purchasing experiences.
This tutorial shows you how to accomplish some common tasks with the Storefront API.
You've authenticated using basic HTTP authentication for your private app or using OAuth for your public or custom app. If you're authenticating to the Storefront API as a public app, then you need to turn your app into a sales channel.
The following example URL shows how you request unauthenticated scopes during OAuth:
You've obtained a Storefront API access token and included it in your request header:
1. Retrieve products
To retrieve a list of products, you can query
products field uses an argument (for example,
first) to specify the number of results to retrieve.
The following example shows how to retrieve the IDs of the first 5 products in your store. For more information on selecting which set of results to retrieve, refer to Paginating results with GraphQL.
2. Retrieve a single product
Products are ide