【问题标题】:Amazon MWS API returning InvalidParameterValue on GetMyFeesEstimate request亚马逊 MWS API 在 GetMyFeesEstimate 请求中返回 InvalidParameterValue
【发布时间】:2021-09-23 10:08:37
【问题描述】:

我有一个脚本可以将一些 ASIN 发送到亚马逊以检索他们的 FeeEstimates,我正在使用 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-&gt;getAmazonProductFeesData 只是我向亚马逊发送请求的函数。一切正常,但对于某些 ASIN,我得到一个模糊的 Client Side Error,看起来像这样:

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

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

【问题讨论】:

    标签: php api client amazon amazon-mws


    【解决方案1】:

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

    【讨论】:

    • 试着把 IsAmazonFulfilled="false"
    • @ÁronPopAdorján 这确实适用于我遇到问题的 ASIN (B095R3Z18D)。但是,我需要收取 FBA 费用,因此将 isAmazonFulfilled 设置为 false 对我来说不是一个选项。谢谢。
    猜你喜欢
    • 1970-01-01
    • 2018-12-29
    • 1970-01-01
    • 2017-04-12
    • 2021-05-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多