Overview
This document focuses on the Random API within the recommendation module. This API is designed to introduce an element of discovery by presenting a selection of products randomly chosen from the platform's catalog. It's an excellent way to expose customers to items they might not have found through traditional search methods.
Use Case
A user visiting an online lifestyle store has no specific product in mind and is browsing for inspiration or gifts. By accessing the Random Products API, the platform can offer a diverse array of products across different categories, such as fashion accessories, home decor, gadgets, and wellness products. This spontaneous discovery encourages exploration and can lead to unexpected purchases, making the shopping experience more engaging and surprising for customers.
Feature Comparison
Compare to other Personalization API features:
-
Similar
The Similar Products provides alternatives that closely match a specific product's characteristics, while the Random selects items without regard to similarity, focusing instead on variety and random discovery. -
Complements and Bought Together
Complements and Bought Together Products suggest products based on compatibility or historical co-buying data, the Random Products API operates independently of any specific product context, offering a broad and unpredictable range of items to the user.
Example
The sample request outlined below demonstrates how to retrieve random product recommendations by specifying the RANDOM type. It includes the session ID for tracking the user's session and the products retrieved limit to 5, indicating that a maximum of 5 recommended products should be returned in the response. In the request body, include the following parameters:
-
type: Set this to RANDOM to specify the recommendation type as random products.
-
session_id: Represents the unique identifier for the user session.
-
limit: Determines the maximum number of products to be returned in the response. In this example, the limit is set to 5.
Sample Request
preparing...
When this request is passed, the API will randomly select products from the store catalog, and offer users a diverse and unpredictable range of items. This promotes exploration and new products discovery, providing an engaging shopping experience.
Sample Response
preparing...