[英]Amazon MWS API returning InvalidParameterValue on GetMyFeesEstimate request
I have a script that sends some ASINs to Amazon in order to retrieve their FeeEstimates, i'm using a php client for the api.我有一个脚本将一些 ASIN 发送到亚马逊以检索他们的费用估算,我正在使用 php 客户端作为 api。
Here is the main part of my code:这是我的代码的主要部分:
$n = count($products);
$amazonFeesAux['MarketplaceId'] = 'my-market-place-id';
$amazonFeesAux['IdType'] = 'ASIN';
$amazonFeesAux['ListingPrice']['CurrencyCode'] = 'EUR';
$amazonFeesAux['IsAmazonFulfilled'] = true;
echo 'Total number of unique ASINs: ' . $n;
for($i = 1; $i <= $n; ++$i)
{
$amazonFeesAux['IdValue'] = $products[$i - 1]['ASIN'];
$amazonFeesAux['ListingPrice']['Value'] = $products[$i - 1]['price'];
$amazonFeesAux['Identifier'] = $i;
array_push($amazonFees, $amazonFeesAux);
if($i % $this->requestQuota == 0)
{
if (++$batchN > $this->requestQuota) sleep(2); // wait 2 seconds to restore 20 items before next request
echo "\n========================================= Batch number: " . $batchN . " =============================================== \n";
$newAmazonProductRanks = $this->getAmazonProductFeesData($amazonFees);
$amazonFees = []; // reset array as to re-populate with next batch
$this->updateProductFees($newAmazonProductRanks); <-- do something with the fees
}
}
Here, my $products
is just my array of ASINs, and $this->getAmazonProductFeesData
is just my function which sends the request to amazon.在这里,我的
$products
只是我的 ASIN 数组,而$this->getAmazonProductFeesData
只是我向亚马逊发送请求的函数。 Everything works fine but for some ASINs I get back a vague Client Side Error
which looks like this:一切正常,但对于某些 ASIN,我返回一个模糊的
Client Side Error
,如下所示:
Does anybody have any idea what am I doing wrong or missing here?有人知道我在这里做错了什么或错过了什么吗?
PS: This code uses GetMyFeesEstimate
original MWS api request. PS:此代码使用
GetMyFeesEstimate
原始 MWS api 请求。
I'm having this issue too, with a particular ASIN.我也有这个问题,有一个特定的 ASIN。 I was able to verify this using the MWS Scratchpad.
我能够使用 MWS Scratchpad 验证这一点。 Other ASINs using the Scratchpad works find though.
其他使用 Scratchpad 作品的 ASIN 可以找到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.