Products.get_competitive_pricing_for_asins로 대상 ASIN의 상품 정보를 가져올 수 없다!? | Amazon Selling Partner API

일본 마켓플레이스(마켓플레이스 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/ 의 포럼에 문제를 상담했습니다.
지원팀으로부터 받은 답변은,
색상을 선택할 수 있는 상품에 관해서는, 색상을 클릭했을 때의 ASIN을 지정해 Call할 필요가 있습니다.
라는 것. 컬러 배리에이션이나 사이즈 등 배리에이션이 있는 상품에 대해서는, 상세까지 선택한 ASIN 정보를 지정할 필요가 있었습니다.
이런, 답을 받고 보면 대단한 일이 아닌데도 꽤 헤맸습니다.


댓글