Nosto provides functionality to retrieve all products for a specific category. This is useful when you want to implement category merchandising using the same API as for Search.
Provide the API parameter to fetch all products associated with that category. Additionally should be provided for better analytics data.
Provide the API parameter to fetch all products associated with that category. This parameter is the same as the categories product field.
Depending on your configuration, fetching a parent category will also include products from the child categories. For example, fetching products for the category Pants would also include products from the categories Pants -> Shorts and Pants -> Khakis.
This is an admin-only setting. Please contact your Nosto representative to adjust this setting.
In some rare cases or is not enough. In these cases can be used to build any query for category & landing pages.
The category page shares a lot of similarities with the search page, so please refer to the search page documentation:
query {
search(
accountId: "YOUR_ACCOUNT_ID"
products: {
categoryId: "123456789",
categoryPath: "Pants"
}
) {
products {
hits {
productId
name
url
imageUrl
price
}
total
size
}
}
}query {
search(
accountId: "YOUR_ACCOUNT_ID"
products: {
categoryPath: "Pants"
}
) {
products {
hits {
productId
name
url
imageUrl
price
}
total
size
}
}
}query {
search(
accountId: "YOUR_ACCOUNT_ID"
products: {
preFilter: [
{
field: "productId",
value: [
"2276",
"2274"
]
}
],
}
) {
products {
hits {
productId
name
}
total
size
}
}
}To analyze user behavior you need to implement tracking. This can be achieved in two different ways, depending on the integration environment:
JavaScript library (recommended - more convenient, but requires a JavaScript environment).
GraphQL API (works anywhere).