# Recommendations API

After Marketing Machine Frame in configured (see Configuration), you can use the API to get recommendations.

# POST /api-s.edrone.me/recommend

# Request

Headers

  • Content-Type: text/html

Query String Parameters

  • app_id: string

Form Data

{
"appId": string, # app ID
"productInteractions": list[dict], # list of product interactions
"recommendFrameInteractions": list, # What user did with frame, eg. clicked category group.
"externalCookieGaId": string, # Google Analytics cookie
"cId": string, # Unique customer tracking identifier (see Fields Overview)
"fpccid": string, # Unique user identifier (see Fields Overview)
"store_recommended_data": boolean, # This is set in edrone_2_0 script
"frameType": string, # 
"currentProductIds": string, # Currently displayed product ID
"currentCategoryIds": string, # Current displayed product category IDs
"filterByGroups": boolean, # Filter products by category groups
"marketingMachineFrameConfigurationId": integer # Marketing Machine ID
}

The productInteractions field is a list of dictionaries with the following fields:

{
"productInteractionType": string, # type of interaction (VIEW, ADD_TO_CART, ORDER)
"productId": string,
"utcInteractionDate": string
}

# Response

{
"rr_id": string, # recommendation request ID
"recommendedProducts": list[dict], # list of recommended products
"filteredByProductCategoryGroups": boolean, # ?
"test": boolean, # ?
"version": string # ?
}

The recommendedProducts field is a list of dictionaries with the following fields:

{
"productTitle": string, # product title
"productImage": string, # product image URL
"productUrl": string, # product URL
"productId": string, # product ID
"productFinalPrice": string, # Price e.g. from feed
"productBasePrice": string, # 
"productDiscountedPrice": string, # 
"productImageHeight": integer, # product image height
"productImageWidth": integer, # product image width
"reasonType": string # type of recommendation (Collaborative Filtering,
                        Basket Analysis, etc.)
}