MWS ASINを指定して最安値を取得する

# はじめに
商品の最安値を調べるってのはリサーチの基本だよね。<br>
今回はASINを指定して最安値を取得するアクションの紹介をしようと思う。<br>
知ってるよそんなのって人も復習がてら見ていったらいいんじゃないか<br>

# どれ使う？
Action：GetLowestOfferListingsForASIN<br>
[Products_GetLowestOfferListingsForASIN](http://docs.developer.amazonservices.com/ja_JP/products/Products_GetLowestOfferListingsForASIN.html)<br>
Response：XML<br>

何個か似たようなのがあるけど今回はGetLowestOfferListingsForASINを使う。<br>

# パラメータ
MarketplaceId：取得したいプラットフォームのID。<br>
ASINList：取得したい商品のASIN（最大20個/リクエスト）。<br>
　　　　　→ ASINList.ASIN.1=...ASINList.ASIN.2=...みたいな感じで指定<br>
ItemCondition：NewとかUsedとか。デフォルトはALL。<br>

# レスポンス
MarketplaceId：JP<br>
ASIN：B01HNORGS4<br>
ItemCondition：New<br>
の情報。<br>

```xml
<?xml version="1.0"?>
<GetLowestOfferListingsForASINResponse xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01">
<GetLowestOfferListingsForASINResult ASIN="B01HNORGS4" status="Success">
  <AllOfferListingsConsidered>false</AllOfferListingsConsidered>
  <Product xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01" xmlns:ns2="http://mws.amazonservices.com/schema/Products/2011-10-01/default.xsd">
    <Identifiers>
      <MarketplaceASIN>
        <MarketplaceId>A1VC38T7YXB528</MarketplaceId>
        <ASIN>B01HNORGS4</ASIN>
      </MarketplaceASIN>
    </Identifiers>
    <LowestOfferListings>
      <LowestOfferListing>
        <Qualifiers>
          <ItemCondition>New</ItemCondition>
          <ItemSubcondition>New</ItemSubcondition>
          <FulfillmentChannel>Amazon</FulfillmentChannel>
          <ShipsDomestically>True</ShipsDomestically>
          <ShippingTime>
            <Max>0-2 days</Max>
          </ShippingTime>
          <SellerPositiveFeedbackRating>98-100%</SellerPositiveFeedbackRating>
        </Qualifiers>
        <NumberOfOfferListingsConsidered>10</NumberOfOfferListingsConsidered>
        <SellerFeedbackCount>267</SellerFeedbackCount>
        <Price>
          <LandedPrice>
            <CurrencyCode>JPY</CurrencyCode>
            <Amount>14560.00</Amount>
          </LandedPrice>
          <ListingPrice>
            <CurrencyCode>JPY</CurrencyCode>
            <Amount>14560.00</Amount>
          </ListingPrice>
          <Shipping>
            <CurrencyCode>JPY</CurrencyCode>
            <Amount>0.00</Amount>
          </Shipping>
        </Price>
        <MultipleOffersAtLowestPrice>False</MultipleOffersAtLowestPrice>
      </LowestOfferListing>
      <LowestOfferListing>
        <Qualifiers>
          <ItemCondition>New</ItemCondition>
          <ItemSubcondition>New</ItemSubcondition>
          <FulfillmentChannel>Merchant</FulfillmentChannel>
          <ShipsDomestically>True</ShipsDomestically>
          <ShippingTime>
            <Max>0-2 days</Max>
          </ShippingTime>
          <SellerPositiveFeedbackRating>90-94%</SellerPositiveFeedbackRating>
        </Qualifiers>
        <NumberOfOfferListingsConsidered>3</NumberOfOfferListingsConsidered>
        <SellerFeedbackCount>342</SellerFeedbackCount>
        <Price>
          <LandedPrice>
            <CurrencyCode>JPY</CurrencyCode>
            <Amount>14750.00</Amount>
          </LandedPrice>
          <ListingPrice>
            <CurrencyCode>JPY</CurrencyCode>
            <Amount>14400.00</Amount>
          </ListingPrice>
          <Shipping>
            <CurrencyCode>JPY</CurrencyCode>
            <Amount>350.00</Amount>
          </Shipping>
        </Price>
        <MultipleOffersAtLowestPrice>False</MultipleOffersAtLowestPrice>
      </LowestOfferListing>
      <LowestOfferListing>
        <Qualifiers>
          <ItemCondition>New</ItemCondition>
          <ItemSubcondition>New</ItemSubcondition>
          <FulfillmentChannel>Merchant</FulfillmentChannel>
          <ShipsDomestically>True</ShipsDomestically>
          <ShippingTime>
            <Max>0-2 days</Max>
          </ShippingTime>
          <SellerPositiveFeedbackRating>95-97%</SellerPositiveFeedbackRating>
        </Qualifiers>
        <NumberOfOfferListingsConsidered>2</NumberOfOfferListingsConsidered>
        <SellerFeedbackCount>58474</SellerFeedbackCount>
        <Price>
          <LandedPrice>
            <CurrencyCode>JPY</CurrencyCode>
            <Amount>16291.00</Amount>
          </LandedPrice>
          <ListingPrice>
            <CurrencyCode>JPY</CurrencyCode>
            <Amount>15941.00</Amount>
          </ListingPrice>
          <Shipping>
            <CurrencyCode>JPY</CurrencyCode>
            <Amount>350.00</Amount>
          </Shipping>
        </Price>
        <MultipleOffersAtLowestPrice>False</MultipleOffersAtLowestPrice>
      </LowestOfferListing>
    </LowestOfferListings>
  </Product>
</GetLowestOfferListingsForASINResult>
<ResponseMetadata>
  <RequestId>6bff571a-3240-49d3-8309-dd08731d6249</RequestId>
</ResponseMetadata>
</GetLowestOfferListingsForASINResponse>
```

[LowestOfferListingsForASINResponse](https://gist.github.com/9844e9a0ffe7e992730164070393aec9)


出品商品グループごとの、最も安い出品の価格情報がXMLで取得できる。<br>
以下ぱっと見わからなさそうな要素のざっくりな説明。<br>
FulfillmentChannel：AmazonがFBA<br>
ShipsDomestically：Trueで国内発送<br>
LandedPrice：商品価格+送料<br>
MultipleOffersAtLowestPrice：Trueで同価格で他のセラーが存在する←知らなんだ<br>

それだけー