RelatedItems Response Group
The RelatedItems
response group returns items related to an item specified in an ItemLookup request. .Related items could be, for example, all of the Unbox episodes in a TV season that are sold separately, or, for example, all of the MP3Download tracks on a MP3 album.
The data returned for RelatedItems
is limited to ASINs and ItemAttributes. This remains true even if you add additional response groups, such as Large, that would otherwise return additional data.
The relationship between items is unidirectional. One item is the parent and one item is the child. Items, however, can have multiple children or multiple parents for a given relationship type.
The way in which the items are related is specified by the RelationshipType
parameter. This parameter is required when you use the RelatedItems
response group. Some values include Episode, Season, Tracks, and Variation. For a list of all relationship types, go to the ItemLookup page.
The relationship type is usually named after the child item in the relationship. For example, an MP3 Track is related to an MP3 album and the type of relationship is Tracks. In this relationship, the album is the parent. If you did an ItemLookup
for an MP3 Track and requested RelatedItems
using Tracks as the RelationshipType
, you would receive the parent album (or albums) for that Track. Conversely, looking up an album using Tracks as the RelationshipType
returns the list of Tracks on that album.
Each ItemLookup
request can return, at most, ten related items. To return additional items, use the RelateditemsPage
parameter. A value of 2, for example, returns the second set of ten related items.
Response Elements
The following elements are returned by RelatedItems
:
RelatedItems
also returns the elements that all response groups return. For more information, go to Elements Common to All Response Groups.
Parent Response Group
The following response groups are parent response groups of RelatedItems
.
-
None
Child Response Group
The following response groups are child response groups of RelatedItems.
-
None
Sample REST Use Case
The following request was used to illustrate the XML response elements returned by RelatedItems
.
http://ecs.amazonaws.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]
&
Operation=ItemLookup&
RelationshipType=Tracks&
ItemId=B0013D8EQK&
ItemType=ASIN&
ResponseGroup=RelatedItems,Small&
Version=2008-08-19
Sample Response Snippet
The following response snippet shows the elements returned by RelatedItems.
<Item> <ASIN>B0013D8EQK</ASIN> <DetailPageURL>http://www.amazon.com/gp/redirect.html%3FASIN=B0013D8EQK%26tag=<AssociateTag>XXXX3FSubscriptionId=[AWS Access Key ID]& </DetailPageURL> <ItemAttributes> <Creator Role="Primary Contributor">Johnny Cash</Creator> <Manufacturer>Columbia/Legacy</Manufacturer> <ProductGroup>Digital Music Album</ProductGroup> <Title>At San Quentin</Title> </ItemAttributes> <RelatedItems> <Relationship>Children</Relationship> <RelationshipType>Tracks</RelationshipType> <RelatedItemCount>31</RelatedItemCount> <RelatedItemPageCount>4</RelatedItemPageCount> <RelatedItemPage>1</RelatedItemPage> <RelatedItem> <Item> <ASIN>B0013D4KJK</ASIN> <ItemAttributes> <Creator Role="Primary Contributor">Johnny Cash</Creator> <Manufacturer>Columbia/Legacy</Manufacturer> <ProductGroup>Digital Music Track</ProductGroup> <Title>The Long Black Veil/Give My Love To Rose (Live)</Title> </ItemAttributes> </Item> </RelatedItem> <RelatedItem> <Item> <ASIN>B0013D7VG4</ASIN> <ItemAttributes> <Creator Role="Primary Contributor">Johnny Cash</Creator> <Manufacturer>Columbia/Legacy</Manufacturer> <ProductGroup>Digital Music Track</ProductGroup> <Title>Folsom Prison Blues (Live)</Title> </ItemAttributes> </Item> </RelatedItem> ... </RelatedItems> </Item>