Getting Started

Recommendations for a subsciber based on the pre-defined context

GET http://<api>/recommendations?context=<contextid>&subscriber=<subscriberid>

Response:

{
  "recommendations": [
    {
      "explanations": [
        {
          "originator": "Preference Engine",
          "type": "engine",
          "level": 0,
          "message": "Recommended because it matches your preferences"
        },
        {
          "originator": "Preference Engine",
          "type": "reference",
          "level": 2,
          "message": "Profile: Movies"
        },
        {
          "originator": "Preference Engine",
          "type": "feature",
          "level": 3,
          "message": "You like genre Thriller & Suspense, genre Suspense"
        }
      ],
      "score": 0.956311821937561,
      "businessScore": 0.956311821937561,
      "groupId": "0",
      "asset": {
        "assetId": "209-20170809024800",
        "assetType": "linear",
        "uiProgramType": {
          "en": "Movie"
        }
      }
    }
  ]
}

What is Context?

All configuration parameters and weight functions used to provide recommendations are called a Context. Every
recommendation request is based on a Context. Contexts can be predefined and referenced in the
recommendation request by a context ID, or can be provided as body of the recommendation request, called an
Ad-hoc Context. A combination of predefined and ad-hoc Contexts is supported, too.

{
    "contextId": <contextId>,
    "rules": [
        "then" : {
        .....
        }
    ]
}

Example

{
        "contextId": "preference",
        "rules": [
            {
                "then": {
                    "blendingPreferenceEngines": [
                        {
                            "name": "blendingPrefEngine1",
                            "minScore": 0.5,
                            "contribution": 1,
                            "profileWeights": "logENumberOfPositiveRatings"
                        }
                    ],
                    "global": {
                        "grouping": "series",
                        "numberOfItems": 1000,
                        "typeOfItems": "groups",
                        "language": "en",
                        "annotation": "customAnnoation1",
                        "maxGroupSize": 1,
                        "maxExplanationLevel": 3
                    }
                }
            }
        ]
    }