Created
August 2, 2016 06:37
-
-
Save mmlin/944fda9a466006a0c93726006991dd88 to your computer and use it in GitHub Desktop.
Amazon MWS example with boto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MWS API docs at http://docs.developer.amazonservices.com/en_US/orders-2013-09-01/Orders_Datatypes.html#Order | |
# MWS Scratchpad at https://mws.amazonservices.com/scratchpad/index.html | |
# Boto docs at http://docs.pythonboto.org/en/latest/ref/mws.html?#module-boto.mws | |
from boto.mws.connection import MWSConnection | |
... | |
# Provide your credentials. | |
conn = MWSConnection( | |
aws_access_key_id=ACCESS_KEY, | |
aws_secret_access_key=SECRET_KEY, | |
Merchant=SELLER_ID | |
) | |
# Get a list of orders. | |
response = conn.list_orders( | |
CreatedAfter='2016-08-01T00:00:00Z', | |
MarketplaceId=[MARKETPLACE_ID] | |
) | |
# Get the Amazon Order Id. | |
response.ListOrdersResult.Orders.Order[0].AmazonOrderId |
Have you managed to get this to work with get_matching_product_for_id ?
i'm getting this error. IndexError: list index out of range.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very Helpful and works out of the box!