amazon-mws: GetMyFees Estimate error
let accessSecret = process.env.AWS_SECRET_ACCESS_KEY;
const amazonMws = require("amazon-mws")(accessKey, accessSecret);
let feesLookUp = async (req, res) => {
const { ASIN, inputPrice } = req.body;
// console.log("res", ASIN, inputPrice);
await amazonMws.products.searchFor(
{
Version: "2011-10-01",
Action: "GetMyFeesEstimate",
SellerId: process.env.MWS_SELLER_ID,
"FeesEstimateRequestList.FeesEstimateRequest.1.MarketplaceId":
process.env.MWS_MARKETPLACE_ID,
"FeesEstimateRequestList.FeesEstimateRequest.1.IdType": "ASIN",
"FeesEstimateRequestList.FeesEstimateRequest.1.IdValue": "ASIN",
"FeesEstimateRequestList.FeesEstimateRequest.1.IsAmazonFulfilled": true,
"FeesEstimateRequestList.FeesEstimateRequest.1.Identifier": "Hello",
"FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.CurrencyCode":
"USD",
"FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.Amount": inputPrice,
"FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.CurrencyCode":
"USD",
"FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.Amount":
"0",
"FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Points.PointsNumber":
"0",
"FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Points.PointsMonetaryValue.Amount":
"0",
"FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Points.PointsMonetaryValue.CurrencyCode":
"USD"
},
function(error, response) {
console.log("res2", response);
if (error) {
console.log("error products", error);
return;
}
console.log("response ", response);
}
);
};
module.exports = {
feesLookUp
};
I have tried alot of different possibilities with strings and no strings but no luck. This is my error which is internal here and my scratchpad works. I also got ListMatchingProducts to work so i know my keys are fine. Also the console log is null but my req.body is consoled log from postman just fine.
Headers:
{ 'x-mws-quota-max': '36000.0',
'x-mws-quota-remaining': '35997.0',
'x-mws-quota-resetson': '2019-02-13T02:52:00.000Z',
'x-mws-timestamp': '2019-02-13T02:03:05.895Z',
'content-type': 'unknown',
'content-charset': 'unknown',
'content-length': 'unknown',
'content-md5': 'unknown',
date: 'Wed, 13 Feb 2019 02:03:05 GMT' },
StatusCode: 500 }```
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (4 by maintainers)
@thebobhudgins - no, I rewrote my project in dotnet core because of this issue.