Help Centre

<

Home
Recommendations API Guide

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

Recommend products

Returns a list of products in slot order:

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

General parameters

  • aid ( string ) - Required - Your site ID, this can be found within your Salesfire dashboard.
  • l ( int ) - Optional - Accepted values: between 1 and 100. A limit on the number of products to be returned.
  • context ( enum ) - Optional - Accepted values: null, homepage, category, product, basket, search, other.
    What type of page is the unit on? This helps our algorithm to return better results.
  • pid ( string ) - Optional - The ID of the current product. This is needed to provide context to the recommendations engine and must match the ID in the product catalogue.
  • shuffle ( int ) - Optional - Accepted values: 0 or 1. Set to 1 to shuffle the returned results.
  • filters[] ( array ) - Optional - See below for values.
  • Show_out_of_stock ( filter array value, boolean ) - Optional - Default: true.
    If enabled, products that are out of stock in the product feed will not be returned.
  • S[0] ( index, int ) - Required - Slot types:
    Most Popular = p
    New In = n
    Bought Together = t
    Similar = s
    Personalised = c

Example

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
}