The previous blog was all about getting credentials of amazon seller, so that developer can access seller account using amazon marketplace web services (MWS). This blog will cover all the aspects of importing or getting all the products of a seller account. So at the very first developer needs to download (php library link) client library.
To import products from amazon seller account, developer has to request for a report using library files, which will return a report request id and again using this report request id, the developer has to ask for the report.
There are basically two steps to get product list from amazon –
- First is to generate report by using file RequestReportSample.php, if everything goes fine then it will return a report request id. Developer will not get any report in this request, this is only to tell amazon that I need a report and prepare it. For requesting a report, developer has to mention that what kind of report do you want. There is a list of report type and developer can ask for any report listed at given link. In general _GET_FLAT_FILE_OPEN_LISTINGS_DATA_ gives all the products that are listed on the seller’s account, irrespective of product status.
- Second step is to get above asked report using GetReportSample.php file, using the report request id that first request has given.
By using above steps, the developer will get all the products as tab-delimited flat file. In which first row is index and from second row product details.
Please check below screenshots to get it programmatically. In the below screenshot, it is all about setting to connect amazon seller account, where you have to provide all the information related to seller account seller id, aws secret access key –
After providing above information, call theRequestReportSample.php file to request report as below screenshot-
At last using request report id GetReportSample.php to get the report as below screenshot-
If you have any query or doubt, please comment below.