2017-02-12 83 views
0

我想使用亚马逊产品广告API获取ASIN的两个价格。一个价格是亚马逊出售的产品,另一个是第三方销售产品的最低价格(就像它在camelcamelcamel上完成的一样)。亚马逊产品广告API。如何获得不是亚马逊卖家的最低价格?

我使用OfferFull响应组并检查响应中的Merchant.Name字段以查看产品是否由Amazon销售。

所以如果不是这样,那么我在Offer中获得了第三方卖家最便宜的价格,而我所要做的就是发布另一个带有参数MerchantId = Amazon的请求来获得Amazon优惠。但是如果亚马逊有最好的报价呢?有没有办法找出第三方卖家的最低价格?

回答

0

把你的反应组 “优惠” 和optionalParameters设置MERCHANTID为 “所有”

例子:

$response = $this->amazon->responseGroup("Medium,Offers")->optionalParameters(['MerchantId'=>'All'])->lookup($amazon_asin); 

而且他们

if(isset($item->Offers->Offer->OfferListing->Price->CurrencyCode)){ 
    $amazon_data_price = $item->Offers->Offer->OfferListing->Price; 
}elseif(isset($item->OfferSummary->LowestNewPrice->CurrencyCode)){ 
    $amazon_data_price = $item->OfferSummary->LowestNewPrice; 
}elseif(isset($item->ItemAttributes->ListPrice->CurrencyCode)){ 
    $amazon_data_price = $item->ItemAttributes->ListPrice; 
}elseif(isset($item->Offers->Offer->OfferListing->SalePrice->CurrencyCode)){ 
    $amazon_data_price = $item->Offers->Offer->OfferListing->SalePrice; 
} 
相关问题