Skip to content

Recommend frequently purchase together items

This feature considers the items that are frequently purchased together and recommend those items for particular products. The endpoint, takes item_id as an input, and in response, gives items that are usually purchased together with the given item.

Request endpoint:

POST /v1/items/purchased/together


Example request body

{
  "user_id": "a0cc6beb-2909-459b-be55-62196af78ce4",
  "member_id": "df3456tg-2909-459b-be55-62196afedf85",
  "item_id": "1000757666",
  "details": true
}

Let's go through the parameters

  • user_id: Mandatory field. Represents the ID of a unique logged-out user, stored in the browser or app local storage. Used for showing and personalizing similar items.
  • member_id: Optional field. Represents the ID of a unique logged-in user, such as a phone number or email address, which can identify the user across devices. Used for showing and personalizing similar items.
  • item_id: Mandatory field. Represents the ID of the item for which similar items will be recommended.
  • details: Mandatory boolean field. Set to True to receive recommended items with details; otherwise, set to False.

How it works

The POST /v1/items/purchase or POST /v1/items/purchase/client endpoint collects user purchase data. This data is used here to suggest frequently bought-together items. If no data is available for an item, no recommendation will be made.