Welcome to Python Amazon MWS’s documentation!

Getting Started

Installation

This process assumes you have already created an Amazon Marketplace Webservices (MWS) account.

Setup API Access

  • Go to https://developer.amazonservices.com (or .ca/.de/.jp/.fr/.co.uk)

  • Click on the Sign up for MWS button and follow the instructions.

  • At the end you must have a screen (print it and save it !)
    This screen will contain the following credentials:
    • Merchant Id (or Seller Id) - This is your unique merchant/seller ID

    • Marketplace Id - This is the id for the marketplace you are selling on.

      It allows you to target specific markerplaces (US, Japan, Europe, etc..) in which you are authorized to sell.

    • Access key - Used to identify the user of this API.

    • Secret key - This is used to authenticate every request sent to Amazon

    Make sure to keep this confidential as these credentials can potentially compromise your account.

Test API Access

  • Go to https://mws.amazonservices.com/scratchpad/index.html (you can change the domain .com like before)

  • In API selection, choose Products and ListMatchingProducts

  • In Authentication put your credentials.

  • Input the desired MarketplaceId and put “python” in Query

  • Click on the submit button

If everything is good, you can see a response 200 and a list of item matching python

Install MWS Python API :)

From PyPi

$ pip install mws

Tutorials

Uploading Products to Amazon

APIs

Feeds

Reports

Here is a very simple example of how to retrieve a report from Amazon (assuming you already have a report ID from a different request, or from seller central) using the python-amazon-mws wrapper.

from mws import mws

access_key = 'accesskey' #replace with your access key
merchant_id = 'merchantid' #replace with your merchant id
secret_key = 'secretkey' #replace with your secret key

reportid = '123456' #replace with report id

x = mws.Reports(access_key=access_key, secret_key=secret_key, account_id=merchant_id)
report = x.get_report(report_id=reportid)
response_data = report.original
print response_data

Fulfillment Inbound Shipment

Fulfillment Inventory

Fulfillment Outbound Shipment

Orders

Here is a very simple example of how to retrieve a orders from Amazon

from mws import mws

access_key = 'accesskey' #replace with your access key
seller_id = 'merchantid' #replace with your seller id
secret_key = 'secretkey' #replace with your secret key
marketplace_usa = 'ATVPDKIKX0DER'

orders_api = mws.Orders(access_key, secret_key, seller_id, region='US')
orders = orders_api.list_orders(marketplaceids=[marketplace_usa], created_after='2017-07-07')

Products

Here is a very simple example of how to retrieve a products from Amazon

from mws import mws

access_key = 'accesskey' #replace with your access key
seller_id = 'merchantid' #replace with your seller id
secret_key = 'secretkey' #replace with your secret key
marketplace_usa = 'ATVPDKIKX0DER'

products_api = mws.Products(access_key, secret_key, seller_id, region='US')
products = products_api.list_matching_products(marketplaceid=marketplace_usa, query='*')

Sellers

Indices and tables