-
-
Save absognety/8e8beb1f0d5b86a1bb07ed495c4c5bb9 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment