6

I am new to amazon mws. I want to do the mws api integration with php. I have all the credentials whatever needed like secret key, seller id, and etc.

Basically i want to display all my orders in my php website. I tried with use of developer guide which is provided by the mws documentation. but i could not get a proper idea of how to integrate api in my php site.

DP TechRocket
  • 114
  • 1
  • 1
  • 7
  • Please provide code sample what you have tried to implement so far and specify your problem more. – Greg Motyl May 29 '17 at 08:38
  • Hi did you managed to do something? I tried few times to do similar think but without working example it is very hard. – awariat Oct 13 '17 at 22:35

2 Answers2

5

First steps in creating an MWS client:

  1. Create a professional seller account on Amazon (fees will apply)
  2. Get credentials for that account
  3. Download the PHP client library
  4. Add your credentials from step 2 to the PHP code
  5. Start developing

In your case you'll want to look at the Reports API, specifically at RequestReport to request a list of orders, which you'll then fetch through GetReport. Eventually you'll probably need to call ManageReportSchedule to automatically create reports ready to fetch.

Hazzit
  • 6,782
  • 1
  • 27
  • 46
  • Hazzit, Thanks a lot for the solution. One more query: which framework/platform is the best for this kind of application? PHP/Python...? can i fetch all the things from amazon seller account to my website like list of orders, product inventory, keywords tracker, product list, total sales and etc? – DP TechRocket May 30 '17 at 09:13
  • You could pretty much use any platform you wish. I would suggest though to use one where there is a client library available, which currently would be C#, PHP and Java. While it is totally possible to write your own library (I've done that), some things are hard to get right, specifically getting the signature to work. BTW, I linked the Products client library, here's the Orders libary: https://developer.amazonservices.com/doc/orders/orders/v20130901/php.html – Hazzit May 30 '17 at 13:35
2

Verify Credentials & Play Around With API:

Please verify if your credentials are correct & you do have orders in your seller account to download from. You can use amazon's scratchpad here: Amazon MWS scratchpad
On scratchpad you want to use following methods.
API Selection: Orders
Operation: ListOrders
You can also refer to this API Guide to better understand scratchpad.


Integration:

Download PHP library from Amazon MWS

  1. You want to add your MWS credentials in this file MarketplaceWebServiceOrders/Samples/.config.inc.php

  2. Here you put in values that you used to play around at scratchpad
    MarketplaceWebServiceOrders/Samples/ListOrders.php
    eg: CreatedAfter, LastUpdatedAfter, OrderStatus

  3. Run this file in browser & you will receive data in XML format MarketplaceWebServiceOrders/Samples/ListOrders.php

Shreyansh Panchal
  • 827
  • 12
  • 22