top of page

Products.get_competitive_pricing_for_asinsで対象ASINの商品情報が取得できない!? | Amazon Selling partner API

  • ろびん
  • 2023年5月28日
  • 読了時間: 2分

更新日:2023年5月30日


ree

日本のマーケットプレイス(マーケットプレイスID: A1VC38T7YXB528)で、競合価格情報を取得するためにAPIを使用しているのですが、いくつものASINに関する情報が期待通り取得できないという現象に遭遇しています。

実行環境: aws lambda

Runtime: python3.9


実行しているコードは以下の通り

from sp_api.api import Products
from sp_api.base.marketplaces import Marketplaces

def lambda_handler(event, context):
	ASIN_LIST = ['B099RSQ9JR', 'B09SYMGWNM', 'B08ZHSWRJN', 'B0921SBWSY', 'B07QGSRCZD']
	obj = Products(marketplace=Marketplaces.JP, credentials=event['credentials'])
	result = obj.get_competitive_pricing_for_asins(ASIN_LIST)

	return result.payload

対象のASIN['B099RSQ9JR', 'B09SYMGWNM', 'B08ZHSWRJN', 'B0921SBWSY', 'B07QGSRCZD']で実行すると、5つのASIN中2つの結果が得られます。

実行結果

[

{

"ASIN": "B099RSQ9JR",

"Product": {

"CompetitivePricing": {

"CompetitivePrices": [

{

"belongsToRequester": false,

"condition": "New",

"subcondition": "New",

"Price": {

"LandedPrice": {

"CurrencyCode": "JPY",

"Amount": 12000

},

"ListingPrice": {

"CurrencyCode": "JPY",

"Amount": 12000

},

"Shipping": {

"CurrencyCode": "JPY",

"Amount": 0

}

},

"CompetitivePriceId": "1"

}

],

"NumberOfOfferListings": [

{

"condition": "New",

"Count": 4

},

{

"condition": "Any",

"Count": 4

}

]

},

"Identifiers": {

"MarketplaceASIN": {

"MarketplaceId": "A1VC38T7YXB528",

"ASIN": "B099RSQ9JR"

}

},

"SalesRankings": [

{

"ProductCategoryId": "fashion_display_on_website",

"Rank": 34189

},

{

"ProductCategoryId": "2221186051",

"Rank": 146

}

]

},

"status": "Success"

},

{

"ASIN": "B09SYMGWNM",

"Product": {

"CompetitivePricing": {

"CompetitivePrices": [],

"NumberOfOfferListings": []

},

"Identifiers": {

"MarketplaceASIN": {

"MarketplaceId": "A1VC38T7YXB528",

"ASIN": "B09SYMGWNM"

}

},

"SalesRankings": []

},

"status": "Success"

},

{

"ASIN": "B08ZHSWRJN",

"Product": {

"CompetitivePricing": {

"CompetitivePrices": [],

"NumberOfOfferListings": []

},

"Identifiers": {

"MarketplaceASIN": {

"MarketplaceId": "A1VC38T7YXB528",

"ASIN": "B08ZHSWRJN"

}

},

"SalesRankings": []

},

"status": "Success"

},

{

"ASIN": "B0921SBWSY",

"Product": {

"CompetitivePricing": {

"CompetitivePrices": [],

"NumberOfOfferListings": []

},

"Identifiers": {

"MarketplaceASIN": {

"MarketplaceId": "A1VC38T7YXB528",

"ASIN": "B0921SBWSY"

}

},

"SalesRankings": []

},

"status": "Success"

},

{

"ASIN": "B07QGSRCZD",

"Product": {

"CompetitivePricing": {

"CompetitivePrices": [

{

"belongsToRequester": false,

"condition": "New",

"subcondition": "New",

"Price": {

"LandedPrice": {

"CurrencyCode": "JPY",

"Amount": 16000

},

"ListingPrice": {

"CurrencyCode": "JPY",

"Amount": 16000

},

"Shipping": {

"CurrencyCode": "JPY",

"Amount": 0

}

},

"CompetitivePriceId": "1"

}

],

"NumberOfOfferListings": [

{

"condition": "New",

"Count": 2

},

{

"condition": "Any",

"Count": 2

}

]

},

"Identifiers": {

"MarketplaceASIN": {

"MarketplaceId": "A1VC38T7YXB528",

"ASIN": "B07QGSRCZD"

}

},

"SalesRankings": [

{

"ProductCategoryId": "fashion_display_on_website",

"Rank": 239300

},

{

"ProductCategoryId": "2221209051",

"Rank": 1920

}

]

},

"status": "Success"

}

]


対象のASIN['B099RSQ9JR']で指定すると、結果は得られます。

実行結果

[

{

"ASIN": "B099RSQ9JR",

"Product": {

"CompetitivePricing": {

"CompetitivePrices": [

{

"belongsToRequester": false,

"condition": "New",

"subcondition": "New",

"Price": {

"LandedPrice": {

"CurrencyCode": "JPY",

"Amount": 12000

},

"ListingPrice": {

"CurrencyCode": "JPY",

"Amount": 12000

},

"Shipping": {

"CurrencyCode": "JPY",

"Amount": 0

}

},

"CompetitivePriceId": "1"

}

],

"NumberOfOfferListings": [

{

"condition": "New",

"Count": 4

},

{

"condition": "Any",

"Count": 4

}

]

},

"Identifiers": {

"MarketplaceASIN": {

"MarketplaceId": "A1VC38T7YXB528",

"ASIN": "B099RSQ9JR"

}

},

"SalesRankings": [

{

"ProductCategoryId": "fashion_display_on_website",

"Rank": 34189

},

{

"ProductCategoryId": "2221186051",

"Rank": 146

}

]

},

"status": "Success"

}

]


対象のASIN['B09SYMGWNM']で指定すると、結果が得られません。

実行結果

[

{

"ASIN": "B09SYMGWNM",

"Product": {

"CompetitivePricing": {

"CompetitivePrices": [],

"NumberOfOfferListings": []

},

"Identifiers": {

"MarketplaceASIN": {

"MarketplaceId": "A1VC38T7YXB528",

"ASIN": "B09SYMGWNM"

}

},

"SalesRankings": []

},

"status": "Success"

}

]


結果が得られなかったASINは有効でありwww.amazon.co.jp上で存在していることは確認しています。今回サンプルで上げたASIN以外でも同様の事象は発生しています。


認証に使用しているクレデンシャルも、結果が得られている場合もあることから正確で必要な権限を持っていることを確認しています。

ドキュメンテーションを確認し、トラブルシューティングの手順も試みましたが、問題は解決しませんでした。


Amazonセリングパートナー開発者サポートや、https://developer.amazon.com/ja/のフォーラムに問題を相談しました。


サポートから回答を頂いた結果、

色を選択できる商品に関しましては、色をクリックした際のASINを指定してCallする必要がございます。

とのこと。カラーバリエーションやサイズなどのバリエーションがある商品については、詳細まで選択したasin情報を指定する必要がありました。

いやはや、回答をもらえば大したことではないにも関わらず、結構ハマってしまいました。

コメント


© Copyright ROBIN planning LLC.

bottom of page