--- title: "Purchased with Last Purchased" slug: "recommendation-api-purchased-with-last-purchased-algorithm" description: "Documents the GET /v2/last-purchased-together endpoint, a personalized algorithm recommending products purchased alongside the user's most recent purchase." tags: ["purchased with last purchased"] updated: 2026-09-09T15:05:48Z published: 2026-09-09T15:05:48Z canonical: "academy.insiderone.com/recommendation-api-purchased-with-last-purchased-algorithm" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Purchased with Last Purchased The Purchased with Last Purchased algorithm is one of Insider One'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[](https://developers.insiderone.com/#38785738-dfab-4ea3-ab11-8e15b32734b7) ## Query Parameters | Parameter | Sample Value | Description | Data Type | Required | | --- | --- | --- | --- | --- | | partnerName | 1000001 | Partner Identifier assigned by Insider One. You can use PartnerID as well. | String | Yes | | locale | us_US | Language or region of the site | String | Yes | | currency | USD | Shows products with the specified currency | String | No | | userId | a1b2c3d4 | User identifier that is assigned by Insider One | 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](https://academy.insiderone.com/docs/filtering-recommendation-responses). 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 One’s personalized recommendation algorithms. ```http https://recommendation.api.useinsider.com/v2/last=purchased-together?partnerName={PartnerName}&locale={Locale}&userId={UserId} ``` ## Sample Response ```json {        "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 Because of its nature, the Purchased with Last Purchased Algorithm doesn’t have a fallback. However, you can always tune it by configuring the minimum number of products displayed in the Recommendation carousel under [Recommendation Strategies](/docs/recommendation-strategies). ## Related - [API Authentication Tokens](/api-authentication-tokens.md) - [API Rate Limits](/api-rate-limits.md) - [API Status and Error Codes](/api-status-and-error-codes.md) - [Insider One APIs in Postman](/insider-apis-in-postman.md)