The Purchased with Last Purchased algorithm is one of Insider's personalized algorithms. It recommends the purchased products along with the user’s last purchased product. Purchase events can be collected from Web, Mobile, and Offline (CRM) UCD events. It is available on Web Smart Recommender, API-based Recommender, and App Recommender.
Endpoint
GET https://recommendation.api.useinsider.com/v2/last-purchased-together
Query Parameters
| Parameter | Sample Value | Description | Data Type | Required |
|---|---|---|---|---|
| partnerId | 1000001 | Partner Identifier assigned by Insider | String | Yes |
| locale | us_US | Language or region of the site | String | Yes |
| currency | USD | Shows products with the specified currency | String | Yes |
| userId | a1b2c3d4 | User identifier that is assigned by Insider | String | Yes |
| platform | web | Requested platform. Web comes by default. | String | No |
| details | true | Adds item details to the response | Boolean | No |
| hp | false | Hyper-personalization activation | Boolean | No |
| size | 50 | Required number of items in response. The maximum allowed size is 100. | Integer | No |
| shuffle | false | Shuffle the products in the response | Boolean | No |
| excludeVariants | true | Exclude variants by the same group ID. If the panel setting is true for this feature, the parameter will always be true. Otherwise, it depends on the parameter. The default value is false. | Boolean | No |
| excludePurchaseDay | 30 | Exclude items the user purchased in X days | Integer | No |
| excludeViewDay | 30 | Exclude items the user viewed in X days | Integer | No |
| excludePurchaseItem | 100 | The number of purchased products to exclude | Integer | No |
| excludeViewItem | 100 | The number of viewed products to exclude | Integer | No |
| productId | ABC123CBA | Current product ID | String | No |
| filter | Smart Recommender filtering. There can be more than one filter parameter. | String | No | |
| categoryList | [“Clothes”, “Skirts”] | Category filters of the product | Array (of string) | No |
| getGroupProducts | true, false | Shows variant products under the products of the response | Boolean | No |
| groupProductsFields | name, category | Adds these fields to the variant products’ details | String | No |
| dayLimit | 7 | Threshold last update day value for Publisher partners. The default is 2 days. | Integer | No |
Sample Request
The sample below displays a request to Purchased with Last Purchased, one of Insider’s personalized recommendation algorithms.
GET https://recommendation.api.useinsider.com/v2/last=purchased-together?partnerName={PartnerName}&locale={Locale}&userId={UserId}¤cy={Currency}
Sample Response
{
"success": true,
"total": 10,
"types": {
"lpt": 10
},
"data": [
"QAZ-7890",
"XYZ-1234",
"QAZ-7899",
"XYZ-1233",
"QAZ-7898",
"XYZ-1243",
"QAZ-7891",
"XYZ-1223",
"QAZ-7892",
"XYZ-1342"
]
}Fallback Algorithms
Due to its nature, the Purchased with Last Purchased Algorithm doesn’t have a fallback algorithm. However, you can always tune it by configuring the minimum number of products to be displayed in the Recommendation carousel in the Recommendation Strategies.