为什么不ItemLookup任何价格信息,甚至要求所有3报价组时返回?(Why is ItemLoo

2019-08-01 12:52发布

我使用的产品广告API做一个ItemLookup上的有效ASIN,要求提供组的所有三种口味,而且我没有得到任何回价格信息。 然而,当我看到在亚马逊同样的产品,它的股票,并具有有效的价格。 我相信一切,我需要对问题进行描述将在ItemLookupResponse回应我ItemLookup请求返回,因为它回显在的所有参数:

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

Answer 1:

编辑:

通过亚马逊产品API返回一个项目可以代表单个变化项目 (单一尺寸和/或单一颜色)的变化母体 。 当返回一个变化的项目,你就必须为你最初并使用同样的方法,你就可以获取价格。

父变化项目 (你的情况),但是,不与任何要约(价格)相关联的,因为它是一个产品的抽象并作为现有产品的变化(不同的尺寸,颜色)的容器。

在这种情况下,包含的变化母公司内的每一个变化都有自己的价格,你可以简单地通过一组变化的迭代,把你需要的价格。

添加的变化响应小组您的搜索/查找的要求是至关重要的,所以不要忽略它。

请求体:

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

响应主体。

一种单一的变化价格下可以找到:

用品- > Variations->用品- >优惠- > OfferListing->价格

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


文章来源: Why is ItemLookup not returning any price information even when requesting all 3 offer groups?