Personalise API

Fetch recommendations for a user

post

Fetch recommendations for a user

Authorizations
AuthorizationstringRequired

Your Product API Read-Only Key

Body
profileIdstringRequired

Unique identifier of the anonymous or known profile

Example: abcd-1234-abcd-1234
stateKeystringOptional

Use this to cache returned results by a specific key. Using this will automatically filter out any results that are in the cache on subsequent requests. Ideal when loading a page with multiple sections of recommendations where you want to avoid overlapping results per section.

Example: abcd-1234-abcd-1234
topNintegerRequired

Number of results to retrieve

Example: 10
pageintegerRequired

Page number to retrieve (defaults to 1 if not provided)

Example: 3
fallbackSearchQuerystringOptional

Fallback search query to use if no results are found for personalisation retrieval.

Example: speakeasy venues to listen to live music and have a cocktail
Responses
200

Fetched recommendations successfully

No content

post
/personalise
POST /personalise HTTP/1.1
Host: product-api.userflux.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 930

{
  "modelConfig": {
    "strategy": "FUSE_ALL_RESULTS",
    "models": [
      {
        "modelId": "abcd-1234-abcd-1234",
        "priority": 1,
        "blendCohortKey": "Australia_Sydney"
      }
    ]
  },
  "profileId": "abcd-1234-abcd-1234",
  "stateKey": "abcd-1234-abcd-1234",
  "propertyFilters": {
    "join": "AND",
    "groups": [
      {
        "join": "AND",
        "conditions": [
          {
            "property": "category",
            "operator": "EQUAL",
            "dataType": "STRING",
            "value": "music"
          }
        ]
      }
    ]
  },
  "geoFilter": {
    "type": "RADIUS",
    "radius": {
      "source": "CUSTOM",
      "distance": 25,
      "distanceUnit": "KILOMETERS",
      "latitude": 51.5074,
      "longitude": -0.1278
    },
    "geoBox": {
      "pair": "NE_SW",
      "northLatitude": 51.5074,
      "northLongitude": -0.1278,
      "southLatitude": 51.5074,
      "southLongitude": -0.1278
    }
  },
  "postFilter": {
    "verifyDateRange": {
      "startDateProperty": "startDate",
      "endDateProperty": "endDate",
      "dateRange": [
        "2025-09-27T00:00:00.000000000Z",
        "2025-09-28T23:59:59.999999999Z"
      ]
    },
    "distinctBy": "merchantId"
  },
  "topN": 10,
  "page": 3,
  "fallbackSearchQuery": "speakeasy venues to listen to live music and have a cocktail"
}

No content

Last updated