Skip to content

Get Product

Retrieve detailed information for a specific product by ID.

Endpoint

GET /api/shop/products/{id}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key

Path Parameters

ParameterTypeRequiredDescription
idintegerYesProduct ID

Query Parameters

ParameterTypeRequiredDescription
includeRelatedbooleanNoInclude related products
includeReviewsbooleanNoInclude product reviews
localestringNoLanguage locale

Response Fields (200 OK)

FieldTypeDescription
idintegerProduct ID
namestringProduct name
slugstringURL-friendly product identifier
skustringStock keeping unit
pricedecimalProduct price
specialPricedecimalSale/discount price
typestringProduct type (simple, configurable, bundle)
weightdecimalProduct weight
descriptionstringFull product description
shortDescriptionstringBrief product description
imageUrlstringMain product image URL
imagesarrayAdditional product images
ratingdecimalAverage rating (0-5)
reviewsintegerNumber of reviews
inStockbooleanStock availability
quantityintegerAvailable quantity
attributesarrayProduct attributes
createdAtstringCreation date
updatedAtstringLast update date

Attributes Structure

FieldTypeDescription
namestringAttribute name
valuestringAttribute value
typestringAttribute type (text, select, multiselect)

Use Cases

  • Display product detail pages
  • Show product information in modals/overlays
  • Build product comparisons
  • Create product recommendations
  • Fetch product data for checkout

Released under the MIT License.