gpt4 book ai didi

amazon-product-api - 为什么即使在请求所有 3 个报价组时 ItemLookup 也不返回任何价格信息?

转载 作者:行者123 更新时间:2023-12-04 01:57:22 26 4
gpt4 key购买 nike

我正在使用产品广告 API 在有效的 ASIN 上执行 ItemLookup,请求所有三种形式的优惠组,但我没有得到任何价格信息。然而,当我在亚马逊上查看相同的产品时,它有库存并且价格合理。我相信我需要描述问题的一切都将在响应我的 ItemLookup 请求而返回的 ItemLookupResponse 中,因为它回显了所有参数:

<ItemLookupResponse>
<OperationRequest>
<HTTPHeaders>
<Header Name="UserAgent"
Value="Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0" />
</HTTPHeaders>
<RequestId>09872c13-5297-4401-ad15-e631b05c7a8f</RequestId>
<Arguments>
<Argument Name="Condition" Value="All" />
<Argument Name="Operation" Value="ItemLookup" />
<Argument Name="Service" Value="AWSECommerceService" />
<Argument Name="Signature"
Value="<omitted>" />
<Argument Name="MerchantId" Value="All" />
<Argument Name="AssociateTag" Value="<omitted>" />
<Argument Name="Version" Value="2011-08-01" />
<Argument Name="ItemId" Value="B00828J7PG" />
<Argument Name="IdType" Value="ASIN" />
<Argument Name="AWSAccessKeyId" Value="<omitted>" />
<Argument Name="Timestamp" Value="2012-10-16T20:30:28.000Z" />
<Argument Name="ResponseGroup" Value="Offers,OfferFull,OfferSummary" />
</Arguments>
<RequestProcessingTime>0.0194200000000000</RequestProcessingTime>
</OperationRequest>
<Items>
<Request>
<IsValid>True</IsValid>
<ItemLookupRequest>
<Condition>All</Condition>
<IdType>ASIN</IdType>
<MerchantId>Deprecated</MerchantId>
<ItemId>B00828J7PG</ItemId>
<ResponseGroup>Offers</ResponseGroup>
<ResponseGroup>OfferFull</ResponseGroup>
<ResponseGroup>OfferSummary</ResponseGroup>
<VariationPage>All</VariationPage>
</ItemLookupRequest>
</Request>
<Item>
<ASIN>B00828J7PG</ASIN>
<ParentASIN>B00828J7PG</ParentASIN>
<OfferSummary>
<TotalNew>0</TotalNew>
<TotalUsed>0</TotalUsed>
<TotalCollectible>0</TotalCollectible>
<TotalRefurbished>0</TotalRefurbished>
</OfferSummary>
<Offers>
<TotalOffers>0</TotalOffers>
<TotalOfferPages>0</TotalOfferPages>
<MoreOffersUrl>0</MoreOffersUrl>
</Offers>
</Item>
</Items>
</ItemLookupResponse><

最佳答案

编辑:

亚马逊产品 API 返回的项目可以代表 单个变体项目 (单一尺寸和/或单一颜色)或 变异父 .当返回单个变体商品时,您只需使用与最初相同的方法即可获取价格。

A 父变体项目 但是,(您的情况)与任何报价(价格)无关,因为它是产品的抽象,并充当现有产品变体(不同尺寸、颜色)的容器。

在这种情况下,变体父项中包含的每个变体都有自己的价格,您可以简单地遍历变体集并获取所需的价格。

添加 变体 对您的搜索/查找请求的响应组至关重要,所以不要省略它。

请求正文:

<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
<ns1:ItemLookup xmlns='http://webservices.amazon.com/AWSECommerceService/2011-08-01' xmlns:ns1='http://webservices.amazon.com/AWSECommerceService/2011-08-01'>
<AWSAccessKeyId>xxxxxxxxxxxxxxxxxxx</AWSAccessKeyId>
<AssociateTag>xxxxxxxx</AssociateTag>
<Request>
<IdType>ASIN</IdType>
<MerchantId>All</MerchantId>
<ItemId>B008M4TB9C</ItemId>
<ResponseGroup>Variations</ResponseGroup>
</Request>
<Signature>xxxxxxxx</Signature>
<Timestamp>2012-12-13T23:49:27Z</Timestamp>
</ns1:ItemLookup>
</env:Body>
</env:Envelope>

响应体。

单个变体的价格可以在以下位置找到:

Item->Variations->Item->Offer->OfferListing->Price .
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Body>
<ItemLookupResponse xmlns='http://webservices.amazon.com/AWSECommerceService/2011-08-01'>
<OperationRequest>
<HTTPHeaders>
<Header Name='UserAgent' Value='JBossRemoting - 2.5.1 (Flounder)'/>
</HTTPHeaders>
<RequestId>05c3ecdd-60ae-4a87-8bcb-70f80a5f5d5b</RequestId>
<Arguments>
<Argument Name='Service' Value='AWSECommerceService'/>
</Arguments>
<RequestProcessingTime>0.1092920000000000</RequestProcessingTime>
</OperationRequest>
<Items>
<Request>
<IsValid>True</IsValid>
<ItemLookupRequest>
<IdType>ASIN</IdType>
<MerchantId>Deprecated</MerchantId>
<ItemId>B008M4TB9C</ItemId>
<ResponseGroup>Variations</ResponseGroup>
<VariationPage>All</VariationPage>
</ItemLookupRequest>
</Request>
<Item>
<ASIN>B008M4TB9C</ASIN>
<ParentASIN>B008M4TB9C</ParentASIN>
<VariationSummary>
<LowestPrice>
<Amount>49500</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$495.00</FormattedPrice>
</LowestPrice>
<HighestPrice>
<Amount>49500</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$495.00</FormattedPrice>
</HighestPrice>
</VariationSummary>
<Variations>
...
<Item>
<ASIN>B007HQYIBW</ASIN>
<ParentASIN>B008M4TB9C</ParentASIN>
...
<ImageSets>
...
</ImageSets>
<ItemAttributes>
....
</ItemAttributes>
<VariationAttributes>
<VariationAttribute>
<Name>Color</Name>
<Value>Black</Value>
</VariationAttribute>
<VariationAttribute>
<Name>Size</Name>
<Value>6 B(M) US</Value>
</VariationAttribute>
</VariationAttributes>
<Offers>
<Offer>
<Merchant>
<Name>Amazon.com</Name>
</Merchant>
<OfferAttributes>
<Condition>New</Condition>
</OfferAttributes>
<OfferListing>
<OfferListingId>xxxxxxxxxx</OfferListingId>
<Price>
<Amount>49500</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$495.00</FormattedPrice>
</Price>
<Availability>Usually ships in 24 hours</Availability>
<AvailabilityAttributes>
<AvailabilityType>now</AvailabilityType>
<MinimumHours>0</MinimumHours>
<MaximumHours>0</MaximumHours>
</AvailabilityAttributes>
<IsEligibleForSuperSaverShipping>1</IsEligibleForSuperSaverShipping>
</OfferListing>
</Offer>
</Offers>
</Item>
</Variations>
</Item>
...
</Items>
</ItemLookupResponse>
</env:Body>
</env:Envelope>

关于amazon-product-api - 为什么即使在请求所有 3 个报价组时 ItemLookup 也不返回任何价格信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12923080/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com