Skip to content

Similar Products recommendation

This feature can be used to recommend similar products, which could be used in your EC site's product details page. This end-point understands the content of your item and returns the most similar items from your catalog as response.

Endpoint for this feature

POST /v1/items/recommend

Example request body

{
  "user_id": "12345",
  "member_id": "67890",
  "item_id": "1000757666",
  "details": true
}

Lets 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 from your catalog, for which similar items will be recommended.
  • details: Mandatory boolean field. Set to True to receive recommended items with details; otherwise, set to False.

Note

  1. You will get an error if the item_id does not exist in the GAIP item catalog. Make sure that the item ID exist before hitting the endpoint.
  2. You must run the item_train at least once after setting up the project to get a response from this endpoint. If a new product in the request body is added to the catalog and item_train hasn’t been run yet, you won’t get a response.