This document focuses on the Bought Together API within the recommendation module. This API leverages historical purchase data to identify and display products commonly bought together by customers. By analyzing patterns in customer behavior, it recommends items that are likely to be of interest based on the product currently being viewed. This feature enhances cross-selling opportunities by suggesting additional products that either enhance or complement the primary purchase, ultimately increasing the average order value.

A customer shopping for a professional-grade blender on a kitchenware eCommerce platform might be primarily focused on the blender's features and specifications. The Bought Together API can enrich this shopping experience by automatically recommending products frequently purchased alongside the blender by previous customers. These products may include blender-specific recipe books, extended warranties, or compatible accessories like to-go cups or additional blades. This not only facilitates a more comprehensive shopping experience but also introduces customers to products they may not have initially considered, enhancing product discovery and satisfaction.

Compare to other Personalization API features:

  • Similar Products
    While the Similar Products focuses on suggesting products similar in nature to the one being viewed, the Bought Together recommends products that, while different, are often purchased together with the primary product.

  • Random
    The Random Products provides a selection of products without specific criteria, aiming to inspire discovery through variety. In contrast, the Bought Together specifically targets products that have a proven track record of being purchased together.

  • Complements
    While both the Complements and the Bought Together suggest additional products, the Complements does so based on product compatibility or necessity, whereas the Bought Together bases its recommendations on historical co-purchase data, highlighting items that customers have found valuable to buy in conjunction.

In the sample request outlined below, we’ve initiated a request to the AfterShip Personalization API to fetch recommendations using the BOUGHT_TOGETHER type. The request includes the following parameters:

  • type: Specifies the type of recommendation, which in this case is set to BOUGHT_TOGETHER.

  • 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.

  • products: Contains an array of products for which the bought-together recommendations are requested. Each product includes an id, source_id, and variants (along with their corresponding source_id). Typical use cases include passing the main product id in the product page, or passing cart line items in the cart page/checkout page.

Sample Request

preparing...

By providing these parameters in the request, the API will analyze historical purchase data and generate a curated list of products frequently bought together with the specified product. This helps users discover bought-together items and encourages them to make additional purchases, thereby increasing the average order value.

Sample Response

preparing...