Answer the question
In order to leave comments, you need to log in
Python wrapper "python-amazon-simple-product-api" using to create a new cart on Amazon?
Hello.
I'm trying to create a new cart on Amazon through using the Python wrapper "python-amazon-simple-product-api". The following code runs well.
from amazon.api import AmazonAPI
amazon = AmazonAPI("valid key","valid key","valid value")
product = amazon.lookup(ItemId='B005M393OO', ResponseGroup="Large")
product.title
product.asin
'1 X 12 Washing Machine Lint Traps Aluminum Mesh With Clamps'
'B010T3VSLW'
amazon_cart = amazon.cart_create([{'offer_id':'B010T3VSLW','quantity': 1}])
cart_create([{'offer_id':'B010T3VSLW','quantity': 1}]).
Answer the question
In order to leave comments, you need to log in
In accordance with Amazon API documentation ASIN is not offer ID:
An offer listing ID is an alphanumeric token that uniquely identifies an item. Use the OfferListingId instead of an item's ASIN to add the item to the cart.
Type: String
Default: None
Valid Values: An Offer Listing ID
So you need to find a way to obtain offer_id. But I can't see this functionality in python-amazon-simple-product-api library.
UPD : There is a pull request
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question