---
description: Admin REST API and Frontend REST API
---

# REST API

![List REST API](https://2986529493-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mgogp6-LLxzONPMFSut%2F-MgxKYfmy9_X5VixEsio%2F-MgxRWzXlOz9DdrlIYmE%2Fres_api.png?alt=media\&token=1c5bac5c-5675-43e2-815f-38fbe8fa8686)

## Get Recommendation Result

<mark style="color:green;">`POST`</mark> `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" |

{% tabs %}
{% tab title="200 Result successfully retrieved." %}
```
{
  "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": ""
}
```
{% endtab %}

{% tab title="404 Unexpected error" %}
```
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 0,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
```
{% endtab %}
{% endtabs %}
