繁体   English   中英

亚马逊 MWS API 在 GetMyFeesEstimate 请求上返回 InvalidParameterValue

[英]Amazon MWS API returning InvalidParameterValue on GetMyFeesEstimate request

我有一个脚本将一些 ASIN 发送到亚马逊以检索他们的费用估算,我正在使用 php 客户端作为 api。

这是我的代码的主要部分:

       $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
            }
       }



在这里,我的$products只是我的 ASIN 数组,而$this->getAmazonProductFeesData只是我向亚马逊发送请求的函数。 一切正常,但对于某些 ASIN,我返回一个模糊的Client Side Error ,如下所示:

在此处输入图片说明

有人知道我在这里做错了什么或错过了什么吗?

PS:此代码使用GetMyFeesEstimate原始 MWS api 请求。

我也有这个问题,有一个特定的 ASIN。 我能够使用 MWS Scratchpad 验证这一点。 其他使用 Scratchpad 作品的 ASIN 可以找到。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM