Retrieve inventory with php and MWS
Solution 1
yes.
use the amazon mws api, specifically the Reports section here
You should request (via RequestReport) an "Open Listings Report". Amazon will give you some minutes later a CSV with all your listings with SKU, ASIN, quantity and price.
When you want to display those listings, you need to display them for yourself. you could link to the ASINs with some pictures, so maybe you need to get those pictures and titles for yourself (maybe with another ReportType).
You can play around with that API in the Amazon MWS Scratchpad.
Solution 2
For anyone using Amazon FBA; use the Fulfillment Inventory API: http://docs.developer.amazonservices.com/en_US/fba_inventory/
(at least; to retrieve your current inventory; maybe not 100% what questioner was asking for, but I arrived at this page few years later looking for the same thing but with FBA)
ReynierPM
A passionate programmer and web developer with a background in front-end and back-end development, which is what he's been doing for over eight years. I had experience in web development using PHP (mostly), MySQL and JavaScript. I follows two major principles everyday work: beauty and simplicity. I believes everyone should learn something new every day. While I'm not working, I spends time coding personal projects, learning, watching screen casts, blogging, etc. Some specific areas of interest for me include cloud computing and anything related to web development among other like system and database administration.
Updated on June 14, 2022Comments
-
ReynierPM almost 2 years
I need to create a PHP script that retrieve and update my inventory from and to Amazon into my personal web page. Can this be done with MWS or any WS? And also need to show in the front of my site all the products I have in Amazon and show a link for users to buy this items trough Amazon.
Any help?
Cheers and many thanks in advance
-
ReynierPM about 12 yearsAnd did you know any way to do this? Anyway MWS allows me to update and retrieve invetory or no?
-
Keyur Padalia about 12 yearsyes it does allow to retrieve quantity and to update quantity For This you will need Amazon Premium Seller Account and need to register for Amazon MWS API Keys. And you will need to learn FEEDs API, Reporting API to do this. The Below Given Links may help you. and they are for PHP Only.
-
Keyur Padalia about 12 years
-
ReynierPM about 12 yearsHmm this content seems to be outdated or maybe I didn't realize how to do that. Is there any pay support from Amazon?
-
ReynierPM almost 12 yearsOk, I've play with Scratchpad but my question is when or where is the results submited? I get Response (200) so seems to be OK but I can't see any downloable file or so.
-
Stefan almost 12 yearsas you can see in the api reference (images-na.ssl-images-amazon.com/images/G/01/mwsportal/doc/en_US/…) you need to first
RequestReport
, then check the status withGetReportRequestList
(look out for the RequestID), and if finished get the result withGetReport
(look out for the ReportID returned by the request list) -
ReynierPM almost 12 yearsOk I get the report now but it's in flat and not in CSV as you said before also only sku, asin, price, quantity is showed. How can I get images, titles and so on for those products?
-
Stefan almost 12 yearsrefer to the
ReportType
in the above stated api reference :) the flat file is a CSV file (if you downloaded it, you'd name it*.csv
) - it is tab separated. -
ReynierPM almost 12 yearsSure, you're right now what about get images and title and other data based on ASIN? I assume that ASIN is like a unique identifier I haven't experience with MWS or any Amazon WS
-
Stefan almost 12 yearsyou must request another
ReportType
which contains the picture url. if there's no picture url, you need to scrape the product pages. -
ReynierPM almost 12 yearsHmmm and where I found that ReportType? I was looking at Scratchpad and none reports sound like return picture URL and titles
-
Stefan almost 12 yearsread that: images-na.ssl-images-amazon.com/images/G/01/mwsportal/doc/en_US/… - if no
ReportType
(page 51) returns a picture url, you need to scrape the picture urls from the amazon web page (en.wikipedia.org/wiki/Web_scraping) -
ReynierPM almost 12 yearsOk, I think must do it using Web_scraping but for titles? I need to get at least titles how?
-
Stefan almost 12 yearsuuh ... i need a lot of patience for you :D use
ReportType
=_GET_MERCHANT_LISTINGS_DATA_
for the title. -
Ravi Soni over 11 yearsHey... @steve i have test with GET_MERCHANT_LISTINGS_DATA type but thid dose not provice image-url... although it has it has a column for it...
-
Stefan over 11 years@ravisoni you're right. that bugs me too. i worked around that by calling the (deprecated) product advertising api. i think the MWS Product API would be better suited for that. developer.amazonservices.com/gp/mws/…
-
Ravi Soni over 11 years@steve thanks for yoru comment ... Can i use product API for inventory Download... actually i have no previous experience with MWS or other API so please suggest what is right to do i just want to export the full inventory in any format with all possible data.. thanks
-
Stefan over 11 yearsno, product API is for retrieving information about products, i.e. title, pictures, product codes, etc. this has nothing to do with your stock. retrieve it via the reports API, like you said with GET_MERCHANT_LISTINGS_DATA for example.