I am trying to run the get_item_offers_batch()
function from the python amazon sp api: https://python-amazon-sp-api.readthedocs.io/en/latest/endpoints/products/#sp_api.api.Products.get_item_offers_batch
However I am getting the following error when the function runs in python: sp_api.base.exceptions.SellingApiBadRequestException: [{'code': 'InvalidInput', 'message': 'InvalidInput', 'details': ''}]
Here is my code
request = [dict(asin="B08CGT4FXL", MarketplaceId="A1PA6795UKMFR9", item_condition='new'), dict(asin="B07KF8LPBC", MarketplaceId="A1PA6795UKMFR9", item_condition='new')]
res = Products(credentials=client_config, marketplace=Marketplaces.DE).get_item_offers_batch(requests_=request)
print(res.payload)
It asks for a List of dictionaries, which I have provided
What could be the issue ?
Tried to rung the python sp api batch function and the script crashes with invalid input code.
It's a bit confusing you basically have to use the uri of the endpoint instead of the asin. Which should look something like this:
Hope that helps.