wusoma / paapi5-nodejs-sdk

Product Advertising API 5.0 SDK for NodeJS
Apache License 2.0
14 stars 6 forks source link

"Bad request" error when requesting the `Offers.Listings.IsBuyboxWinner` resource #1

Closed cbdeveloper closed 4 years ago

cbdeveloper commented 4 years ago

Hello there,

I'm getting Bad request error when I add the Offers.Listings.IsBuyboxWinner resource.

This is the code:

const getItemsRequest = new ProductAdvertisingAPIv1.GetItemsRequest();

getItemsRequest["PartnerTag"] = "my-partner-tag";
getItemsRequest["PartnerType"] = "Associates";
getItemsRequest["ItemIdType"] = "ASIN";
getItemsRequest["Condition"] = "New";
getItemsRequest["Resources"] = ["Offers.Listings.Price","Offers.Listings.IsBuyboxWinner"];
getItemsRequest["ItemIds"] = asinArray;  // THIS IS AN ARRAY WITH THE ASIN I NEED

Note: This very same code is working when I remove the Offers.Listings.IsBuyboxWinner resource.

This is a valid resource, as per https://webservices.amazon.com/paapi5/documentation/offers.html

What could be happening?

Any help is appreciated. Thanks

cbdeveloper commented 4 years ago

Just found out that this error was being caused by a typo in IsBuyboxWinner. The correct value is IsBuyBoxWinner (the B is also capitalized)

Unfortunately, some parts of the Amazon DOCs got this typo, as you can see below:

image