先日Amazon MWSの新しいAPIセクション、「サブスクリプションAPI」がリリースされたことをご案内いたしました。
今日はこのAPIのより詳細な情報のご紹介と、ご利用方法についてご案内いたします。
サブスクリプションAPIとは何か?
今までAmazon MWSが提供していたAPIは、その都度リクエストを行い、Amazon MWSからのレスポンスを取得するPULL型のサービスとなっていました。
これに対してサブスクリプションAPIではあらかじめサブスクライブ(購読)設定をすることにより、その購読設定に該当するイベントが発生したときに、その情報をAmazon MWSが通知する、PUSH型のサービスとなります。
メリットは?
メリット1:商品APIでリクエスト回数が不足していた出品者様には朗報です。Amazon MWSではリクエスト数に上限が設定されています。しかし、このサブスクリプションAPIではPUSH型の機能ですので、都度Amazon MWSにリクエストを行わないでも、情報が返却される、ということはリクエスト回数が上限に達してスロットル制限にかかる心配がありません。
メリット2:サブスクリプションAPIのAnyOfferChangeの通知情報では商品APIで取得できなかった情報が取得できるようになりました。詳しくは後述の「サブスクリプションAPIで現在購読できる情報について」をご参照ください
サブスクリプションAPIで現在購読できる情報について
現在のところ「AnyOfferChange」(出品情報の変動)が発生した際に通知を行う機能を提供しています。
出品者様が出品している商品に対して、その商品を出品する他のTOP20の出品者様が価格などの出品情報を変更した場合に変動後の出品情報を含んだXMLを送信します。TOP20は出品価格順で決定されます。
送信されるXMLファイルの中には以下の情報が返却されます。
<Summary情報>
- オファー数
- 最低価格
- BuyBoxセラーの価格
- セールスランキング
- BuyBoxEligibleセラー数
<TOP20セラーのオファー情報>
- セラーID
- コンディション
- フィードバックRating
- 価格
- フルフィルメントチャネル
- コンディションノート
- 海外出荷可否
これは今まで商品APIのオペレーションでは取得できなかった情報の取得が可能です。
特に、出品者別のオファー情報が確認できるようになるので、商品API利用からの移行も検討してみてはいかがでしょうか?
XMLサンプル(一部情報はマスクしております)
<Notification>
<NotificationMetaData>
<NotificationType>AnyOfferChanged</NotificationType>
<PayloadVersion>1.0</PayloadVersion>
<UniqueId>3a130c8a-6f40-4dfb-95f4-a38b41fe87a7</UniqueId>
<PublishTime>2013-10-11T08:19:14.607Z</PublishTime>
<SellerId>A3JLPMZ4L*****</SellerId>
<MarketplaceId>A1VC38T7YXB528</MarketplaceId>
</NotificationMetaData>
<NotificationPayload>
<AnyOfferChangedNotification>
<OfferChangeTrigger>
<MarketplaceId>A1VC38T7YXB528</MarketplaceId>
<ASIN>41035*****</ASIN>
<ItemCondition>used</ItemCondition>
<TimeOfOfferChange>2013-10-11T08:19:12.854Z</TimeOfOfferChange>
</OfferChangeTrigger>
<Summary>
<NumberOfOffers>
<OfferCount condition="new" fulfillmentChannel="Merchant">3</OfferCount>
<OfferCount condition="collectible" fulfillmentChannel="Merchant">37</OfferCount>
<OfferCount condition="used" fulfillmentChannel="Merchant">251</OfferCount>
</NumberOfOffers>
<LowestPrices>
<LowestPrice condition="new" fulfillmentChannel="Merchant">
<LandedPrice>
<Amount>1890</Amount>
<CurrencyCode>JPY</CurrencyCode>
</LandedPrice>
<ListingPrice>
<Amount>1890</Amount>
<CurrencyCode>JPY</CurrencyCode>
</ListingPrice>
<Shipping>
<Amount>0</Amount>
<CurrencyCode>JPY</CurrencyCode>
</Shipping>
</LowestPrice>
<LowestPrice condition="collectible" fulfillmentChannel="Merchant">
<LandedPrice>
<Amount>565</Amount>
<CurrencyCode>JPY</CurrencyCode>
</LandedPrice>
<ListingPrice>
<Amount>315</Amount>
<CurrencyCode>JPY</CurrencyCode>
</ListingPrice>
<Shipping>
<Amount>250</Amount>
<CurrencyCode>JPY</CurrencyCode>
</Shipping>
</LowestPrice>
<LowestPrice condition="used" fulfillmentChannel="Merchant">
<LandedPrice>
<Amount>251</Amount>
<CurrencyCode>JPY</CurrencyCode>
</LandedPrice>
<ListingPrice>
<Amount>1</Amount>
<CurrencyCode>JPY</CurrencyCode>
</ListingPrice>
<Shipping>
<Amount>250</Amount>
<CurrencyCode>JPY</CurrencyCode>
</Shipping>
</LowestPrice>
</LowestPrices>
<BuyBoxPrices>
<BuyBoxPrice condition="New">
<LandedPrice>
<Amount>1890</Amount>
<CurrencyCode>JPY</CurrencyCode>
</LandedPrice>
<ListingPrice>
<Amount>1890</Amount>
<CurrencyCode>JPY</CurrencyCode>
</ListingPrice>
<Shipping>
<Amount>0</Amount>
<CurrencyCode>JPY</CurrencyCode>
</Shipping>
</BuyBoxPrice>
<BuyBoxPrice condition="Used">
<LandedPrice>
<Amount>1890</Amount>
<CurrencyCode>JPY</CurrencyCode>
</LandedPrice>
<ListingPrice>
<Amount>1890</Amount>
<CurrencyCode>JPY</CurrencyCode>
</ListingPrice>
<Shipping>
<Amount>0</Amount>
<CurrencyCode>JPY</CurrencyCode>
</Shipping>
</BuyBoxPrice>
</BuyBoxPrices>
<ListPrice>
<Amount>1800</Amount>
<CurrencyCode>JPY</CurrencyCode>
</ListPrice>
<SalesRankings>
<SalesRank>
<ProductCategoryId>book_display_on_website</ProductCategoryId>
<Rank>1170</Rank>
</SalesRank>
<SalesRank>
<ProductCategoryId>507150</ProductCategoryId>
<Rank>12</Rank>
</SalesRank>
</SalesRankings>
<BuyBoxEligibleOffers>
<OfferCount condition="new" fulfillmentChannel="Merchant">3</OfferCount>
<OfferCount condition="collectible" fulfillmentChannel="Merchant">24</OfferCount>
<OfferCount condition="used" fulfillmentChannel="Merchant">164</OfferCount>
</BuyBoxEligibleOffers>
</Summary>
<Offers>
<Offer>
<SellerId>A3MD3XVIL*****</SellerId>
<SubCondition>acceptable</SubCondition>
<SellerFeedbackRating>
<FeedbackCount>351188</FeedbackCount>
<SellerPositiveFeedbackRating>96</SellerPositiveFeedbackRating>
</SellerFeedbackRating>
<ShippingTime minimumHours="24" maximumHours="48"/>
<ListingPrice>
<Amount>1</Amount>
<CurrencyCode>JPY</CurrencyCode>
</ListingPrice>
<Shipping>
<Amount>250</Amount>
<CurrencyCode>JPY</CurrencyCode>
</Shipping>
<ShipsFrom>
<Country>JP</Country>
<State></State>
</ShipsFrom>
<IsFulfilledByAmazon>false</IsFulfilledByAmazon>
<ConditionNotes>コンディションノート</ConditionNotes>
<IsExpeditedShippingAvailable>false</IsExpeditedShippingAvailable>
<IsFeaturedMerchant>true</IsFeaturedMerchant>
<ShipsDomestically>true</ShipsDomestically>
<ShipsInternationally>true</ShipsInternationally>
</Offer>
以下最大20のオファー情報(出品情報)が出力されます
・
・
・
・
・
・
</AnyOfferChangedNotification>
</NotificationPayload>
</Notification>
利用方法について
サブスクリプションAPIの利用は大まかに以下の手順にて利用設定を行います
(1)Amazon SQSのキューの作成
Amazon AWSが提供するキューサービスです。詳細はこちら
メッセージを蓄積させるための受け皿を作るとお考えください。Amazon MWSで購読設定された情報はAmazon SQSのキューに蓄積されます。
(2)Amazon MWSで購読設定を行います。
何を購読するか?(現時点ではAnyOfferChangeのみですが)どこに購読情報を送付するか(現時点ではAmazon SQSのキューのみ)の設定を行います。
(3)Amazon SQSのキューに蓄積された情報を取得します。
取得した情報は出品者様の価格改定等のための参考情報としてお役立てください。
サブスクリプションAPIの具体的なご利用方法はこちらのAPIリファレンスをダウンロードください。
今後具体的な設定方法をスクリーンショットを交えて本ブログでご案内いたします。
今後ともAmazon MWSをどうぞよろしくお願いいたします