t3chnoboy / amazon-product-api

:credit_card: Amazon Product Advertising API client
367 stars 104 forks source link

Unable to do itemLookup by upc #44

Closed buy closed 8 years ago

buy commented 8 years ago

Hi,

Thanks for creating this client, I am trying to fetch product by UPC by following the example here:

client.itemLookup({
  idType: 'UPC',
  itemId: '884392579524'
}).then(function(results) {
  console.log(JSON.stringify(results));
}).catch(function(err) {
  console.log(err);
});

However, I am getting the following error when doing so, am I missing anything or amazon API now requires additional param for this call?

[
  {
    "Error": [
      {
        "Code": [
          "AWS.MinimumParameterRequirement"
        ],
        "Message": [
          "Your request should have atleast 1 of the following parameters: 'Keywords','Title','Power','BrowseNode','Artist','Author','Actor','Director','AudienceRating','Manufacturer','MusicLabel','Composer','Publisher','Brand','Conductor','Orchestra','TextStream','Cuisine','City','Neighborhood'."
        ]
      }
    ]
  }
]

Thank you!

buy commented 8 years ago

nvm, I am such a dumb ass and I was using the wrong function ... (used itemSearch instead of itemLookUp)