If a customer buys one list item for a friend, the customer might be interested in other list items that the friend has specified. Amazon Associates Web Service offers access to four types of lists, including WishLists, Listmania, WeddingRegistry, and BabyRegistry. When a customer purchases an item from one list, you might display all of the items on the friend's lists.
To find a customer's list, you must:
Find the list ID. Supplying a customer name or e-mail address in a ListSearch request returns the customer's list IDs.
Use one of the list IDs in a ListLookup request. This operation returns the items in the specified list.
For example, to look up the lists created by a fictional person named John Smith, you would use the following request:
http://ecs.amazonaws.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[Access Key ID]&
Operation=ListSearch&
ListType=WishList&
Name=John%20SmithNotice that the space between the first and last name is URL-encoded with %20.
The following snippet from the response shows one of the lists that John Smith created:
<List> <ListId>ZZ6666662H77</ListId> <ListURL>http://www.amazon.com/gp/registry/ZZ6666662H77 </ListURL> <ListType>WishList</ListType> <TotalItems>51</TotalItems> <TotalPages>6</TotalPages> <DateCreated>2002-10-02</DateCreated> <CustomerName>
This repines shows that John Smith's wish list has 51 items on it. It would take 6 pages to return all of the items because there are up to twenty items per page. You can use the value for <TotalPages> to repeat the request with a different ListPage value until all 6 pages are returned.
The response also shows that you can display the wish list using the URL specified by ListURL.
Now that you have John's wish list ID, you can use the following request to return the items on the wish list.
http://ecs.amazonaws.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
Operation=ListLookup&
ListType=WishList&
ListId=ZZ6666662H77&
ResponseGroup=ListFullThe following response snippet lists two of the items on John's wish list.
<ListItem>
<ListItemId>IOWNUUPH86VRC</ListItemId>
<DateAdded>2002-01-27</DateAdded>
<QuantityDesired>1</QuantityDesired>
<QuantityReceived>0</QuantityReceived>
<Item>
<ASIN>1890966533</ASIN>
<ItemAttributes>
<Title>Safety Incentives: The Pros and Cons of Award and Recognition Programs (Osha Compliance)</Title>
</ItemAttributes>
</Item>
</ListItem>
<ListItem>
<ListItemId>I1JY2MH4BGECYR</ListItemId>
<DateAdded>2002-01-27</DateAdded>
<QuantityDesired>1</QuantityDesired>
<QuantityReceived>0</QuantityReceived>
<Item>
<ASIN>0963229613</ASIN>
<ItemAttributes>
<Title>Confined Space Program: A Complete Compliance Program (Osha Compliance)
</Title>
</ItemAttributes>
</Item>
</ListItem>There is enough information returned by the ListFull response group to suggest that a customer purchase additional wish list items. If you want to add more information, such as an image, about one of the wish list items, submit an ItemLookup request using the ASIN of the wish list item.