POST /{environment}/recommendations/requests Description Request recommendations for an environment-aware setup. Parameters Type Name Description Schema Path environment required The environment for which the request is made. string Body body required RecommendationRequest Responses HTTP Code Description Schema 200 OK Recommendations Consumes application/json Produces application/json Example HTTP request Request body { "channel" : "web", "device_id" : "the-cookie-id-123", "histories" : { "followed_categories" : [ { "id" : "electronics", "item_type" : "category", "timestamp" : 1581854333 }, { "id" : "beauty", "item_type" : "category", "timestamp" : 1581952165 }, { "id" : "gaming", "item_type" : "category", "timestamp" : 1581954120 } ], "items_in_basket" : [ { "id" : "15ae0cc899", "item_type" : "product", "reconsumable" : false, "timestamp" : 1581076041 }, { "id" : "1caab5c40c", "item_type" : "product", "reconsumable" : false, "timestamp" : 1581054230 } ] }, "lists" : [ { "configuration_id" : "some_id", "limit" : 5, "list_name" : "Some list name", "list_size" : 10 } ], "page_type" : "home", "user_id" : "the-user-id-123-like-cookie" } Example HTTP response Response 200 { "device_id" : "the-cookie-id-123", "lists" : [ { "configuration_id" : "some_id", "items" : [ { "information_field" : "some_metadata", "item_id" : "item_id_1", "rank" : 1 }, { "information_field" : "some_metadata", "item_id" : "item_id_2", "rank" : 2 } ], "limit" : 2, "list_key" : "a_unique_list_identifier", "list_name" : "Some list name", "list_size" : 10 } ], "request_id" : "2141141", "user_group" : "froomle", "user_id" : "the-user-id-123-like-cookie", "version" : "froomle_1" } Item One content-item. Name Description Schema information_field optional The Froomle API can be configured to return additional information fields (if present in the item information). Please contact your Froomle Solution Architect to set this up. string item_id required The identifier of the recommended item string rank required The rank at which the item is recommended. Starts counting at 1. integer RequestList The specification to configure which lists of items to retrieve. Name Description Schema configuration_id required A string identifier of the configuration to be used for this list. The configuration needs to be registered with Froomle through the configuration API first string limit optional default = list_size integer list_content optional A list of items (id, item_type, rank) that will be injected in the response. < ListContentItem > array list_name required A string identifier for the list. The list names should be unique in a single request. string list_size required The number of items to recommend. integer ListContentItem One mandatory list-content-item. Name Description Schema item_id required The identifier of the mandatory item. string item_type optional Type of the entity (e.g. item, article, video, category, group, …). These types are Froomle-defined, please consult your solutions architect for the correct type. string rank required The rank at which the item should be recommended. Starts counting at 1. integer Histories Dict of additional customer-defined histories each having a maximum length of 50 tuples Type : < string, < HistoryItem > array > map HistoryItem Single event entity defined by at least an identifier Name Description Schema id required Identifier of the entity of the event, we support most entities that would appear in a detail_pageview, item_interaction, group_pageview or group_interaction. string item_type optional Type of the entity (e.g. item, article, video, category, group, …). These types are Froomle-defined, please consult your solutions architect for the correct type. string reconsumable optional True if the entity is allowed to appear in the generated recommendations boolean timestamp optional Unix timestamp (seconds since Jan 1st 1970 00:00:00) of the event integer RecommendationRequest Specification of a Recommendation request. Name Description Schema channel optional The channel used to request the recommendations (e.g. web, android, ios, …) string context_item optional Unique identifier for the currently displayed item, if applicable. string device_id required Unique identifier for a unregistered user (e.g. cookie) string histories optional Histories lists required < RequestList > array page_type required The page type to request recommendations for string user_id optional Unique identifier for a user string ResponseList A list of limit items is returned. Potentially the list consists of list_size items in total, of which the next can be queried by passing the list_key to the /lists endpoint. Name Description Schema configuration_id optional Bytestring identifier of the List’s configuration. string items optional List of limit Items. limit is equal to the minimum of limit specified in the request and the number of recommendations found. < Item > array limit optional Number of Items returned integer list_key optional Bytestring identifier of the List. string list_name optional Bytestring name of the list. As specified in the request. string list_size optional Total number of Items in this List (of which only limit Items are returned) integer Recommendations Name Description Schema device_id optional Unique identifier for an unregistered user (e.g. cookie) string lists optional List of lists of items < ResponseList > array request_id optional The request identifier as supplied by Froomle. This request_id needs to be supplied with each logged event. string user_group optional The group the user is assigned to. If users get the Froomle experience, this will always be "froomle". string user_id optional the user id given for the request string version optional The A/B version the user is currently assigned to. string