Retrieve a Product in Storefront

In this guide, you'll learn how to retrieve a product and its details in the storefront.

How to Retrieve a Product in Storefront?#

There are two ways to retrieve a product:


Retrieve a Product by ID#

To retrieve a product by its ID, send a request to the Retrieve Product API route:

Tip: Learn how to install and configure the JS SDK in the JS SDK documentation.

The response has a product field, which is a product object.

Tip: Refer to the Features in Product Details Page section to learn about other features you can add to a product details page.

Retrieve a Product by Handle#

To retrieve a product by its handle, send a request to the List Products API route passing it the handle query parameter:


Features in Product Details Page#

In a product's details page, you want to allow the customer to choose a variant, see its price, and add it to the cart.

The following guides will help you add these features into your storefront:

Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break