Recommendations API Documentation

You can use our Recommendations API if you wish to build and maintain your own UI or integrating into an existing search framework.

Recommend Products

Returns a list of products. The results are returned in slot order.

GET https://aix.salesfire.co.uk/api/v2/recommend

General Parameters

  • aid - (string: required) - Site ID (This can be found within your Salesfire Dashboard).
  • l - (int: optional, default 12) - A limit on the number of products to be returned, between 1 and 100.
  • context - (enum: null, homepage, category, product, basket, search, other) - What type of page it is to help us better deliver result.
  • pid - (string: optional) - The ID of the current product. This is needed to provide context to the Recommendation engine.
  • shuffle - 0 or 1 - Whether to mix up the results.
  • filters[] - see below - An array of filters.

Filter Parameters

  • show_out_of_stock - (boolean: optional, default true) If enabled, products that are out of stock will not be returned.

Slots

  • s[index] - index = int - Which algorithm to use for each slot. (If you specify less than the limit, the slots will repeat themselves.)

Slot Types

  • Most Popular: p
  • New In: n
  • Bought Together: t
  • Similar: s
  • Personalised: c

Example

curl -G -X GET https://aix.salesfire.co.uk/api/v2/recommend \
  -d aid={YOUR_CLIENT_ID} \
  -d "l=8" \
  -d "context=product" \
  -d "pid=32ds050s3" \
  -d "filters[show_out_of_stock]=0" \
  -d "s[0]=c" \
  -d "s[0]=c" \
  -d "s[0]=n" \
  -d "s[0]=t" \
  -d "s[0]=s" \
  -d "s[0]=s" \
  -d "s[0]=s" \
  -d "s[0]=s"
{
    "client": "{YOUR_CLIENT_ID}",
    "products": [
        {
            "id": "195d12af567",
            "title": "Example Title",
            "brand": "My Brand",
            "price": {
                "min": 55,
                "max": 55,
                "savings": 0,
                "currency": null,
                "unit": null
            },
            "image_url": "...",
            "images": {
                "blue": "..."
            },
            "link": "...",
            "links": {
                "blue": "..."
            },
            "in_stock": true,
            "docid": 1593,
            "score": 247.11899264046633,
            "origin": "bestsellers"
        },
        ...
    ],
    "time": 0.0004520416259765625,
    "timestamp": 1635226700,
    "icon_available": true
}