Category Pages
Category Pages drill down into products of a certain type, like a collection or brand. Using Miso’s Search Engine, you can create personalized Category Pages where the products are sorted by relevance to the user.
Introduction
A prominent feature in almost all e-commerce sites, category pages allow your customers to quickly drill into a specific category - such as a collection or brand - of your product catalog. Since personalization is at the core of Miso’s Search Engine, the products within the category page are rank-sorted in real-time, based on our insights about the customer’s preferences.
For example, suppose you are running an online jewelry store and want to showcase a collection of vintage watches. With Miso’s Recommendation Engine, we will uniquely order the watches to reflect one customer’s preference for vintage chronographs and order it differently based on another customer’s preference for vintage divers.
Do it with APIs
To return the list of rank-sorted products within a category, we first need to query all the products in the product catalog and then narrow the results down to a specific category. We also need to include the user_id
or anonymous_id
so that we can tailor the results to a specific user. From the above example, suppose a user selects the “diving” category. The API request would look like the following:
POST /v1/search/search
{
"q" : "*", //query all products
"category": ["Diving Watches"],
"user_id": "user-123"
}
Note: The category
parameter also supports sub-categories. Using the above example, if we wanted an even narrower category, we could include something like category: [”Dive Watches”, “1950s-1970s”]
.
The API response might look like the following:
{
"message":"success",
"data":{
"took":50,
"total":25,
"start":0,
"miso_id":"f34b90de-086b-11eb-b498-1ee8abb1818b",
"products":[
{
"product_id":"Rolex Submariner ref 5513",
"categories": [["Dive Watches"]],
..., // Additional scoring information
},
{
"product_id":"Omega Seamaster Planet Ocean",
"categories": [["Dive Watches"]],
..., // Additional scoring information
}
]
}
}
(Note: the response has been condensed for illustrative purposes)
Additional Resources
For more information on Miso’s Search API, check out the official API Documentation.
For more recipes like this, visit the Recipes page on our Docs site.
Published Date: April 15th, 2022
API Reference
Need more info on the API? Check out our dedicated API page with all the info you could ever want.
Read API Reference