Question

I am trying to display the amazon products of a specific category on my website using amazon product advertising api. I am writing code is asp.net. I am being able to successfully retrieve its price, title,image,url.I also want to get its product id that amazon uses.I had a look at its documentation in which they had mentioned something about the UPC(universal product code) and ASIN.But they have explained look up search based on UPC and ASIN. I am too confused as to how to get its product id.

String requestString ="Service=AWSECommerceService"
               + "&Version=2013-29-03"
               + "&Operation=ItemSearch"
               + "&AssociateTag=myassociatetag"
               + "&SearchIndex=" +category
               + "&ItemPage=5"
               + "&Sort=relevancerank"
               + "&ResponseGroup=ItemAttributes,Images"
               + "&Keywords=" + keyword
               + "&Timestamp=[YYYY-MM-DDThh:mm:ssZ]"
               ;

Can you please help me and tell me where to add itemid in this requeststring. Thank you .

Was it helpful?

Solution

Add the response group "ItemIds" to retrieve "ASIN" into your request parameter

  • "&ResponseGroup=ItemAttributes,Images,ItemIds"

UPC is returned by "ItemAttributes" response group which is already in your code.it will only return UPC if it exists in Amazon Database.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top