List products in a category
Get all products and clusters within a category, with filtering and pagination.
Query
query GetCategoryProducts($categoryId: Int!, $page: Int, $offset: Int, $taxZone: String!) {
category(categoryId: $categoryId) {
categoryId
name { language value }
products(input: {
getDescendants: true
page: $page
offset: $offset
}) {
itemsFound
page
pages
minPrice
maxPrice
items {
... on Product {
productId
sku
names { language value }
price(input: { quantity: 1, taxZone: $taxZone }) { gross net }
}
... on Cluster {
clusterId
names { language value }
defaultProduct {
productId
price(input: { quantity: 1, taxZone: $taxZone }) { gross net }
}
}
}
}
}
}
Variables
{
"categoryId": 1795,
"page": 1,
"offset": 20,
"taxZone": "NL"
}
Response
{
"data": {
"category": {
"categoryId": 1795,
"name": [{ "language": "NL", "value": "Computers / laptops" }],
"products": {
"itemsFound": 42,
"page": 1,
"pages": 3,
"minPrice": 299,
"maxPrice": 3499,
"items": [
{
"productId": 1895,
"sku": "HP-450G10-I5",
"names": [{ "language": "NL", "value": "HP ProBook 450 G10 i5" }],
"price": { "gross": 899, "net": 1087.79 }
},
{
"clusterId": 190,
"names": [{ "language": "NL", "value": "Dell Latitude 5540 serie" }],
"defaultProduct": {
"productId": 92275,
"price": { "gross": 1049, "net": 1269.29 }
}
}
]
}
}
}
}
How it works
Set getDescendants: false to only get products placed directly in this category (not in child categories). The minPrice and maxPrice fields reflect the price range across the full result set, useful for price sliders. Results contain both Products and Clusters, so use inline fragments.