Follow

Asking for recommendations

BrainSINS recommendations can be requested via an API REST call with the following format:

Path:

https://api.brainsins.com/RecSinsAPI/api/recomm/idItem/{IDITEM}/idUser/{IDUSER}.json?token={TOKEN}&idRec={IDREC}&maxResult={MAXRESULTS}

Type: GET

URL Parameters:

  • IDPRODUCT (optional): if product recommendation, specify the base product
  • IDUSER: numeric user identifier
  • TOKEN: your account BrainSINS token
  • IDREC: recommender identifier
  • MAXRESULTS: number of results to retrieve

Example:

https://api.brainsins.com/RecSinsAPI/api/recomm/idItem/1234/idUser/1000001.json?token=BS-8709661092-1&idRec=3&maxResult=5

If not using a product recommender, the "idItem" path component can be trimmed. The following example does not contain idItem:

https://api.brainsins.com/RecSinsAPI/api/recomm/idUser/1000001.json?token=BS-8709661092-1&idRec=3&maxResult=5

The format retrieved by this resource includes a list of products in json format. If you need this list to be expresed in XML, just change the format suffix in the call syntax:

https://api.brainsins.com/RecSinsAPI/api/recomm/idUser/1000001.xml?token=BS-8709661092-1&idRec=3&maxResult=5

You also can get this request from our administration panel (BrainSINS Analytics) doing click on the cloud symbol just on the right the recommender you need. You can find recommenders in next the path Optimization > Recommenders > List

Captura.PNG

 

Recommendation response

The response include several metadata fields, and a list describing the recommended products. The most important fields in this description are:

  • id, name, url, imageUrl, price, categories:  essential product information, extracted from the product feed
  • value & ranking: relevance and position of this recommendation
  • explanation & algorithm: the criteria used to retrieve this recommendation

Response example:

{
"@version": "0.1",
"status": "200",
"count": "8",
"details": "medium",
"lang": "es",
"filter": "",
"categories": "",
"list": [
{
"id": "28984",
"value": "1.0",
"ranking": "2",
"name": "Toalla de baño Advance",
"misc": "{\"original_price\":\"\",\"novelty\":\"0\",\"promo\":\"0\",\"top_sales\":\"0\",\"type\":\"configurable\"}",
"url": "http://catalog.brainsins.com/default/catalog/product/id/28984/toalla-gris/?idRecommendation=1-28984&idPrevPage=8623",
"imageUrl": "http://catalog.brainsins.com/default/catalog/product/A/D/ADU-TOALL-ADVANCE-GRO-1.jpg",
"price": "8.9",
"categories": "baño,advance,adulto,",
"explanation": "MOST-VISITED",
"algorithm": "MOST-VISITED"
},
{
"id": "29127",
"value": "0.01",
"ranking": "2",
"name": "Bolsa Primera",
"misc": "{\"original_price\":\"\",\"novelty\":\"0\",\"promo\":\"0\",\"top_sales\":\"0\",\"type\":\"configurable\"}",
"url": "http://catalog.brainsins.com/default/catalog/product/id/29127/bebe-bolsas-primera-azul/?idRecommendation=1-29127&idPrevPage=8623",
"imageUrl": "http://catalog.brainsins.com/default/catalog/product/B/E/BEB-BOLSA-PRIMERA-AZU-1.jpg",
"price": "10.9",
"categories": "niños,primera,bebe,",
"explanation": "MOST-VISITED",
"algorithm": "MOST-VISITED"
}]
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk