🔏
Magento 2 Step Recommendation
  • Overview
  • Installation
    • Setup module
  • Config and Usage
    • Module Configuration
    • Create Recommendation Rules
      • Manage Questions & Answers
      • Manage Redirect Links
      • Manage Recommendation Rules
    • Show module block on frontend
    • Import CSV file
    • Export Rule to CSV file
  • REST API
  • Change Log
  • Other Module Guides
    • Magento 2 Multi Vendor
    • Ves Page Builder (Free)
    • Magento 2 Coupon Code (Free)
    • Magento 2 Barcode Suite (Free)
Powered by GitBook
On this page

Was this helpful?

REST API

Admin REST API and Frontend REST API

PreviousExport Rule to CSV fileNextChange Log

Last updated 3 years ago

Was this helpful?

Get Recommendation Result

POST https://yourdomain.com/rest/v1/lof-steprecommendation/result

This endpoint allows you to get recommendation result with answers and rule, can access by anonymous

Query Parameters

Name
Type
Description

store_id

integer

current store id

rule_id

integer

The step recommendation rule_id

answers

string

list answer index of rule questions example: "1,2,2"

{
  "category_id": 0,
  "products": [
    {
      "product_id": 3,
      "sku": "24-MB03",
      "price": 38,
      "description": "short description crawn summit backpack...",
      "name": "Crown Summit Backpack",
      "image": "/m/b/mb03-black-0.jpg",
      "item_url": "https://yourdomain.com/crown-summit-backpack.html?___store=default"
    },
    {
      "product_id": 4,
      "sku": "24-MB05",
      "price": 45,
      "description": "short description wayfarer",
      "name": "Wayfarer Messenger Bag",
      "image": "/m/b/mb05-black-0.jpg",
      "item_url": "https://yourdomain/wayfarer-messenger-bag.html?___store=default"
    }
  ],
  "thumb_width": 100,
  "thumb_height": 100,
  "show_image": 1,
  "show_price": 1,
  "show_description": 1,
  "show_sku": 1,
  "show_review": 1,
  "show_addtocart": 1,
  "sort_max": 100,
  "description": "",
  "name": "",
  "image": "",
  "item_url": "",
  "query_link": "",
  "cms_block_id": ""
}
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 0,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
List REST API