New Arrivals
2 min
f you haven't gone through the prerequisites and the v2 structure, please have a look at Overview
Klevu can power a recommendation banner showcasing the newest products in the store. The most common placements for this banner type are:
Homepage: New Arrivals Show a recommendation banner with the newest products across the entire store.
Category Page: New Arrivals in {Category} Show a banner with the newest products within a specific category.
The newness of each product is determined by an attribute in your catalogue which can be configured via our Klevu Support team. It could be the Product ID or a date field, for example.
New Arrivals Product Recommendations
The end-point is used for retrieving new arrival product recommendations.
POST
https://eucs19v2.ksearchnet.com/cs/v2/search
var data = JSON.stringify({"context":{"apiKeys":["klevu-158755634955912036"]},"recordQueries":[{"id":"recsNewArrivals","typeOfRequest":"RECS_NEW_ARRIVALS","settings":{"query":{"categoryPath":"Women Sweatshirts"},"typeOfRecords":["KLEVU_PRODUCT"]}}]});
var xhr = new XMLHttpRequest();
xhr.withCredentials = false;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://eucs19v2.ksearchnet.com/cs/v2/search");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);Try it here!