Getting Top Sellers From the Shopping Cart

It is assumed that any item that a customer adds to their shopping cart is of interest to them. For that reason, Amazon Associates Web Service provides the CartTopSellers response group that returns the ASINs and titles of the top five, best sellers in the root category of the item specified in the cart operation. For example, when adding a television to a cart, the five top sellers in the root category, electronics, are returned, for example, the top selling computers, MP3 players, or digital cameras.

The CartTopSellers response group can be used with most cart operations, for example,

http://ecs.amazonaws.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
AssociateId=ws&
Operation=CartCreate&
Item.1.ASIN=B000062TU1&
MergeCart=True&
Item.1.Quantity=2&
ResponseGroup=CartTopSellers

The following is a snippet of the response:

<TopSellers>
  <TopSeller>
    <ASIN>B00005JOFQ</ASIN>
    <Title>Brokeback Mountain (Widescreen Edition)</Title>
  </TopSeller>
  <TopSeller>
    <ASIN>B000E6EK3S</ASIN>
    <Title>Harry Potter and the Goblet of Fire (Widescreen Two-Disc Deluxe Edition)(Harry Potter 4)</Title>
  </TopSeller>
</TopSellers>

This response shows that there are two top sellers associated with the root product category of the item that was added to the shopping cart.