Related Products API

Get products similar to the one on display, by client-set rules or from the same category.

Last updated

On this page

Use the Related Products API to retrieve products similar to the ones currently displayed. To receive recommendations, provide the product ID of the item you want related products for.

Which products are returned

The related products can be defined by client-set rules. If no rules are specified, the API returns products from the same category as the provided product ID.

The API also lets you specify the number of related products and their titles to be displayed.

Endpoint

MethodPath
POST/api/v1/getRelatedProducts
POST/api/v2/getRelatedProducts

Request body

JSON
{
   "product_id": 1786,  //required
   "token": "{{ website_token }}"  //required
}

Successful response

JSON
{
    "title": "Related Products",
    "rule_id": 11,
    "size": 6,
    "data": [
        {
            "short_description": null,
            "first_click_position": 0,
            "link": "http://www.local.magento.com/hollister-backyard-sweatshirt.html",
            "description": "Kick off your weekend in the Hollister Backyard.",
            "created_at": "2021-09-01 08:54:33",
            "availability": 1,
            "configurable_options": [ …
            ],
            …
        },
        …
    ]
}