Products API Routes
Customers browse products for their purchase.
A product has variants for different option values. The customer chooses from these variants before adding it to the cart.
These API routes allow customers to browse products.
GET /store/products#
List Products
Retrieve a list of products. The products can be filtered by fields such as id. The products can also be sorted or paginated.
You can retrieve the content of the products translated to a specific locale either by passing the locale query parameter or by setting the x-medusa-locale header to the desired locale code in BCP 47 format. If you don't pass a locale, and your store has a default locale, the default locale will be used.
With localization, the products' content like title and description will be in the specified locale if a translation is available, and fallback to the original content otherwise. Learn more in the Localization section.
Authentication: none.
Header parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.$andobject[]Optional$orobject[]OptionalqstringOptionalidstring | string[]Optionaltitlestring | string[]Optionalhandlestring | string[]Optionalis_giftcardbooleanOptionalcollection_idanyOptionaltag_idstring | string[]Optionaltype_idstring | string[]Optionalcreated_atobjectOptionalupdated_atobjectOptionalregion_idstringOptionalprovincestringOptionalus-casales_channel_idstring | string[]Optionalcategory_idstring | string[]OptionalvariantsobjectOptionalFilter the products' variants.
variantsobjectOptionalcountry_codestringOptionalcart_idstringOptionallocalestringOptionalen-USexternal_idstring | string[]Optionaloption_value_idstring | string[]Optionaloption_idstring | string[]OptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberestimate_countnumberOptionalproductsobject[]The list of products.
productsobject[]400, 401, 404, 409, 422, 500: an error response is returned.
GET /store/products/{id}#
Get a Product
Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned.
You can retrieve the content of the product translated to a specific locale either by passing the locale query parameter or by setting the x-medusa-locale header to the desired locale code in BCP 47 format. If you don't pass a locale, and your store has a default locale, the default locale will be used.
With localization, the product's content like title and description will be in the specified locale if a translation is available, and fallback to the original content otherwise. Learn more in the Localization section.
Authentication: none.
Path parameters
idstringHeader parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.region_idstringOptionalcountry_codestringOptionalprovincestringOptionalus-cacart_idstringOptionalregion_id, country_code, and province properties.localestringOptionalen-USRequest examples
Responses
200 OK
productobjectThe product's details.
productobject400, 401, 404, 409, 422, 500: an error response is returned.