Get Product Details
GetProductDetails
Fetch a single product and its variants by storefront handle using the storeProductByHandle query. This is ideal for landing pages that need to display a specific product (and its variant options) before adding items to the cart.
Use case​
Use this query when you have a product URL or handle and want to:
- Render product details on a custom landing page.
- Show images, description, price, and variant options.
- Let shoppers select a variant and quantity before calling cart mutations such as
AddToCart.
Operation​
query GetProductDetails($storeId: ID!, $handle: String!, $locale: String) {
storeProductByHandle(storeId: $storeId, handle: $handle, locale: $locale) {
id
title
handle
type
status
source
isVisible
isArchived
locale
shortDescription
descriptionHtml
taxable
productTax
createdAt
updatedAt
images {
id
src
altText
width
height
}
seo {
title
description
}
options {
id
name
position
values {
id
name
}
}
attributes {
id
name
type
values {
id
name
}
}
collections {
nodes {
id
title
}
totalCount
}
variants(first: 50) {
nodes {
id
title
sku
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
cost {
amount
currencyCode
}
quantity
trackQuantity
selectedOptions {
option {
id
name
}
value {
id
name
}
}
externalId
cartLimitsEnabled
minPerCart
maxPerCart
packageDetails {
weight
dimensions {
length
width
height
}
}
createdAt
updatedAt
}
}
}
}
Example variables​
{
"storeId": "Store_cm84j35iy02m001i89iiu2cts",
"handle": "example-product",
"locale": "en"
}
Notes​
handleis the product handle from the storefront URL, for example for:https://pharmacy.wuiltstore.com/en/products/example-product- the handle is
example-product.
- Use the returned
variantsdata (price, SKU, selected options, limits) to build your variant selector and to supplyvariantIdwhen calling cart mutations.
GraphQL Endpoint​
https://graphql.wuilt.com
Operation: GetProductDetails​
Try It Out​
Query​
Query Variables
1
2
3
4
5
Note: Make sure to change the storeId with your store ID. For guidance on how to get your store ID, reference the Store ID guide.
Authentication​
To use this query, you will need an API key. Click the "API Key" button in the navigation bar to enter your credentials.