🚧
This is a low level API, we recommend you to use the simple recommendation route to enable easy configuration via the Merchant Dashboard.
Get the list of the newest items.
You can pass an array of rules to the widget to filer widget results.
An example of rules object for different types of data:
[{
type: 'text',
name: 'brand',
values: [{value: ['Some-Test-Brand']}, {value: ['Some-Other-Brand']}]
}, {
type: 'range',
name: 'price',
values: [{from: 10}, {to: 20}, {from: 10, to: 20}]
}, {
type: 'category',
name: 'category',
values: [{value: ['Top-Level']}, {value: ['Top-Level', 'Second-level']}]
}]