Browserside Schemas v1.1
If you were looking for the legacy 1.0 documentation, you will find it here.

Recommendation Requests

Retrieves recommendations or calculations from Gravity.
URL
https://recommender.sannsyn.com/ajaxrecapi/1.1/recommend
Method
POST
Request Mimetype
application/Json
Request Json
Key
JSON Value Type
Mandatory
Value
service
String
Yes
recommender
String
Yes
The name of the recommender to use
input
Object with named Multi ID objects
Yes
Key/value pairs where the keys are strings and the values are multi ID objects. Keys to use depend on the chosen recommender and are defined in cooperation with Sannsyn
num
Number
No
The number of recommendations to generate. Defaults to 10
consumer
String
Yes
The user that the requested recommendations are meant for. If the user is unknown, use the string anonymous.
tags
String list
No
Free text one-word messages to the Gravity System. These must be defined in cooperation with Sannsyn before use to have any effect.
Response Mimetype
application/Json
Responses
HTTP Status Code
Response Body
200
40x
A General Status Response object where the text field will describe the error

Try it out

For testing purposes, there is a Gravity service named example. Use the form on the Updates page to send some recognizable data to the system and check here afterwards to see if your updates are reflected in the recommendations you order.

The browserside API endpoint identifies the caller. Your browser is equipped with a random ID that will serve as the consumer ID if none is given (i.e. if "consumer":"anonymous"). Try requesting recommendations in another browser if you want to see recommendations differ between customers.
URL: