saleweaver/python-amazon-sp-api

Batch API calls don't work

zweedao opened this issue · 0 comments

Describe the bug

  1. Try to make this batch API call:
    response = ProductFees(credentials=amz_credentials, marketplace=Marketplaces.CA).get_product_fees_estimate( [ dict(id_type='ASIN', id_value='B016NBKRBQ', price=100, is_fba=True), dict(id_type='ASIN', id_value='B0728J9VGB', price=100, is_fba=True), ] )

It responses with '...client-side error...':

{'errors': None,
'headers': {'Server': 'Server', 'Date': 'Tue, 21 Nov 2023 17:07:51 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'x-amz-rid': 'SVY31TBANV5703RN6ZB0', 'x-amzn-RateLimit-Limit': '0.5', 'x-amzn-RequestId': 'f371a319-2d60-4711-b95b-548d671c20ac', 'x-amz-apigw-id': 'OPFf371a3192d60', 'X-Amzn-Trace-Id': 'Root=1-655ce3e7-f371a3192d604711', 'Content-Encoding': 'gzip', 'Vary': 'accept-encoding,Content-Type,Accept-Encoding,User-Agent', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload'},
'kwargs': {},
'next_token': None,
'pagination': None,
'payload': [{'Error': {'Code': 'InvalidParameterValue',
'Detail': [],
'Message': 'There is an client-side error. Please '
'verify your inputs.',
'Type': 'Sender'},
'FeesEstimateIdentifier': {'IdType': 'ASIN',
'IdValue': 'B016NBKRBQ',
'IsAmazonFulfilled': True,
'MarketplaceId': 'A2EUQ1WTGCTBG2',
'PriceToEstimateFees': {'ListingPrice': {'Amount': 100,
'CurrencyCode': 'USD'}},
'SellerId': 'A12SI314GENJ68',
'SellerInputIdentifier': '100'},
'Status': 'ClientError'},
{'Error': {'Code': 'InvalidParameterValue',
'Detail': [],
'Message': 'There is an client-side error. Please '
'verify your inputs.',
'Type': 'Sender'},
'FeesEstimateIdentifier': {'IdType': 'ASIN',
'IdValue': 'B0728J9VGB',
'IsAmazonFulfilled': True,
'MarketplaceId': 'A2EUQ1WTGCTBG2',
'PriceToEstimateFees': {'ListingPrice': {'Amount': 100,
'CurrencyCode': 'USD'}},
'SellerId': 'A12SI314GENJ68',
'SellerInputIdentifier': '100'},
'Status': 'ClientError'}],
'rate_limit': '0.5'}

  1. Another batch API call:
    response = Products(credentials=amz_credentials, marketplace=Marketplaces.CA).get_listing_offers_batch( [ dict(asin='B00J8VUH5U', item_condition='New'), dict(asin='B0728J9VGB', item_condition='New'), ] )

Got this error:
AttributeError: 'Products' object has no attribute 'get_listing_offers_batch'

Desktop (please complete the following information):

  • OS: Mac