Response Details

Prev Next

Each Smart Recommender endpoint returns a response consisting of success, total, types and data fields in JSON format.

Response Parameters

ParameterDescriptionData Type
successIndicates response success.Boolean
totalReturns the number of products in the response.Integer
dataConsists of a list of products.Array (of string)
image_urlImage URL of the product.String
nameName of the product.String
item_idID of the product.String
urlURL of the product.String
in_stockStock information of the product. If in stock, 1; otherwise 0.Integer
priceCurrent price of the product. All currencies what are used will be displayed in this field too. E.g. USD, EUR (String).String
localeIf language of the website is American English, this field returns de_DE, id_ID etc.String
categoryCategory breadcrumb of the product.Array (of string)
languageSame as locale.String
discountOriginal Price/Price ratio will return. E.g. USD, EUR (Float).Float
original_priceOriginal price value of the product. E.g. USD, EUR (Integer).Integer
totalNumber of items in response.Integer
product_attributesObject for product attributes.Object
colorColor information of the product.String
first_categoryFirst category in the category breadcrumb of the product.String
sizeSize information of the product.String
typesReturns the recommendation types including the main type of the endpoint and fallback types.Object

Types

TypeDescription
ubUser-based
vtvViewed Together
btbPurchased Together
mvMost Viewed
mvocMost Viewed of Category
mvopMost Viewed of Partner
mpMost Purchased
mpocMost Purchased of Category
mpopMost Purchased of Partner
mpolMost Purchased of Location
hdHighest Discounted
hdopHighest Discounted of Partner
hdocHighest Discounted of Category
tpTrending Products
tpopTrending Products of Partner
tpocTrending Products of Category
naNew Arrivals
naopNew Arrivals of Partner
naocNew Arrivals of Category
pdProduct Details
mmManual Merchandising
mixedMixed Strategy
chefChef
mvpMost Valuable Products
mvpopMost Valuable Products of Partner
mvpocMost Valuable Products of Category
cpComplementary Products
spSubstitute 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.