Each Smart Recommender endpoint returns a response consisting of success, total, types and data fields in JSON format.
Response Parameters
Parameter | Description | Data Type |
---|---|---|
success | Indicates response success. | Boolean |
total | Returns the number of products in the response. | Integer |
data | Consists of a list of products. | Array (of string) |
image_url | Image URL of the product. | String |
name | Name of the product. | String |
item_id | ID of the product. | String |
url | URL of the product. | String |
in_stock | Stock information of the product. If in stock, 1; otherwise 0. | Integer |
price | Current price of the product. All currencies what are used will be displayed in this field too. E.g. USD, EUR (String). | String |
locale | If language of the website is American English, this field returns de_DE, id_ID etc. | String |
category | Category breadcrumb of the product. | Array (of string) |
language | Same as locale. | String |
discount | Original Price/Price ratio will return. E.g. USD, EUR (Float). | Float |
original_price | Original price value of the product. E.g. USD, EUR (Integer). | Integer |
total | Number of items in response. | Integer |
product_attributes | Object for product attributes. | Object |
color | Color information of the product. | String |
first_category | First category in the category breadcrumb of the product. | String |
size | Size information of the product. | String |
types | Returns the recommendation types including the main type of the endpoint and fallback types. | Object |
Types
Type | Description |
---|---|
ub | User-based |
vtv | Viewed Together |
btb | Purchased Together |
mv | Most Viewed |
mvoc | Most Viewed of Category |
mvop | Most Viewed of Partner |
mp | Most Purchased |
mpoc | Most Purchased of Category |
mpop | Most Purchased of Partner |
mpol | Most Purchased of Location |
hd | Highest Discounted |
hdop | Highest Discounted of Partner |
hdoc | Highest Discounted of Category |
tp | Trending Products |
tpop | Trending Products of Partner |
tpoc | Trending Products of Category |
na | New Arrivals |
naop | New Arrivals of Partner |
naoc | New Arrivals of Category |
pd | Product Details |
mm | Manual Merchandising |
mixed | Mixed Strategy |
chef | Chef |
mvp | Most Valuable Products |
mvpop | Most Valuable Products of Partner |
mvpoc | Most Valuable Products of Category |
cp | Complementary Products |
sp | Substitute Products |
Sample Responses
{
"success":true,
"total":15,
"types":{
"mvop":15
},
"data":[
"99352",
"112085",
"88564",
"70408",
"112029",
"17625",
"46730",
"108224",
"112037",
"50322",
"86918",
"76917",
"32398",
"53935",
"18951"
]
}
If product IDs are enough, then details parameter has no use when sending the request to the API. The endpoint will return only product IDs in JSON format.
When the details=true parameter is used in the endpoint, a response as the following will return.
{
"success": true,
"total": 2,
"types": {
"mvop": 2
},
"data": [
{
"image_url": "https://image.jpg",
"name": "13243",
"item_id": "93507",
"url": "https://www.mywebsite.com/product",
"in_stock": 1,
"price": {
"EUR": 160.0
},
"locale": "en_US",
"product_attributes": {
"color": "White",
"first_category": "Shoes",
"size": "36, 37, 38"
},
"category": [
"Shoes",
"Women",
"Sneakers"
],
"discount": {
"EUR": 19.98
},
"original_price": {
"EUR": 199.95
}
},
{
"image_url": "https://image.jpg",
"name": "5406",
"item_id": "10534",
"url": "https://www.mywebsite.com/product",
"in_stock": 1,
"price": {
"EUR": 80.0
},
"locale": "en_US",
"product_attributes": {
"color": "White",
"first_category": "Shoes",
"size": "36, 37, 40"
},
"category": [
"Shoes",
"Men",
"Sneakers"
],
"discount": {
"EUR": 42.84
},
"original_price": {
"EUR": 139.95
}
}
]
}
Product attributes such as color, category, and size are defined through system rules when mapping the product detail pages. Depending on the custom parameters defined on the product details, product attributes return as a response to your request.