Retrieve a Collection's Products in Storefront
In this guide, you'll learn how to retrieve a collection's products in the storefront.
In your storefront, you may want to display a collection's products to the customers. To do so, you can retrieve the products that belong to a collection and display them in your storefront.
To retrieve a collection's products in the storefront, send a request to the List Products API route passing it the collection_id
query parameter:
Tip: Learn how to install and configure the JS SDK in the JS SDK documentation.
In this example, you retrieve the products that belong to a collection by passing the collection's ID as a query parameter to the List Products API route. You can also pass other query parameters to filter or paginate the products, such as limit
and offset
.
The response has a products
field, which is an array of products.
Was this page helpful?