Reputation: 1230
I need to get the top selling books along with it's details from amazon jp.
As of now, I can get the top selling books but it only gives ASIN
and TITLE
for each item.
<TopSeller>
<ASIN>4047318752</ASIN>
<Title>艦これ白書 -艦隊これくしょん オフィシャルブック-</Title>
</TopSeller>
So I need to get the item's details separately. I can get the details now but there is no PRICE
even if I include OFFERS
and it's variations.
This is the uri I use:
http://webservices.amazon.co.jp/onca/xml?" .
"Service=AWSECommerceService" .
"&Operation=ItemLookup" .
"&BrowseNodeId=465610" .
"&MerchantId=Amazon" .
"&Condition=All" .
"&IdType=ASIN" .
"&Availability=Available" .
"&Version=2011-08-01" .
"&AssociateTag=$this->associateTag" .
"&BrowseNode=17".
"&ItemId=$itemIds" .
"&ResponseGroup=OfferFull";
This is working, it's just that the price is not getting listed, and I just omitted the other ResponseGroup
.
If you have another idea of getting the top selling books with details and price. I'd be more than happy to see it.
As Requested by CyberMJ:
Request:
"http://webservices.amazon.co.jp/onca/xml?" .
"Service=AWSECommerceService" .
"&Operation=ItemLookup" .
"&BrowseNodeId=465610" .
"&MerchantId=Amazon" .
"&Condition=All" .
"&IdType=ASIN" .
"&Availability=Available" .
"&Version=2011-08-01" .
"&AssociateTag=$this->associateTag" .
"&BrowseNode=17".
"&ItemId=$itemIds" .
"&ResponseGroup=Variations";
Response:
<ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2011-08-01">
<OperationRequest>
<HTTPHeaders>
<Header Name="UserAgent" Value="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36"/>
</HTTPHeaders>
<RequestId>b66dda52-62bf-495e-abd5-f2f9a8d96eeb</RequestId>
<Arguments>
<Argument Name="Condition" Value="All"/>
<Argument Name="Operation" Value="ItemLookup"/>
<Argument Name="Service" Value="AWSECommerceService"/>
<Argument Name="AssociateTag" Value="mediabooks0db-20"/>
<Argument Name="BrowseNode" Value="17"/>
<Argument Name="Version" Value="2011-08-01"/>
<Argument Name="Signature" Value="/tC4kFaeaxsvL11YLthHe09PHKUQVAxTTZrf6D8FXiw="/>
<Argument Name="Availability" Value="Available"/>
<Argument Name="MerchantId" Value="Amazon"/>
<Argument Name="ItemId" Value="B00DYKPPGM,4047318752,4103345918,4047292664,B00DYKPPGM,4758007837"/>
<Argument Name="BrowseNodeId" Value="465610"/>
<Argument Name="IdType" Value="ASIN"/>
<Argument Name="AWSAccessKeyId" Value="AKIAIGEZH2RG5QKAUQ5Q"/>
<Argument Name="Timestamp" Value="2013-09-19T12:04:18Z"/>
<Argument Name="ResponseGroup" Value="Variations"/>
</Arguments>
<RequestProcessingTime>0.0160898510000000</RequestProcessingTime>
</OperationRequest>
<Items>
<Request>
<IsValid>True</IsValid>
<ItemLookupRequest>
<Condition>All</Condition>
<IdType>ASIN</IdType>
<MerchantId>Deprecated</MerchantId>
<ItemId>B00DYKPPGM</ItemId>
<ItemId>4047318752</ItemId>
<ItemId>4103345918</ItemId>
<ItemId>4047292664</ItemId>
<ItemId>B00DYKPPGM</ItemId>
<ItemId>4758007837</ItemId>
<ResponseGroup>Variations</ResponseGroup>
<VariationPage>All</VariationPage>
</ItemLookupRequest>
</Request>
<Item>
<ASIN>B00DYKPPGM</ASIN>
</Item>
<Item>
<ASIN>4047318752</ASIN>
</Item>
<Item>
<ASIN>4103345918</ASIN>
</Item>
<Item>
<ASIN>4047292664</ASIN>
</Item>
<Item>
<ASIN>4758007837</ASIN>
</Item>
</Items>
</ItemLookupResponse>
Upvotes: 0
Views: 1803
Reputation: 443
I think I figured it out, try changing your response group to
responseGroup('Large,VariationSummary')
And then get the price via
$response->Items->Item->VariationSummary->LowestPrice->Amount
Adding VariationSummary allowed me to get prices on the few items that were missing them
Upvotes: 1