Amazon provided MWS ( Amazon Marketplace Web Service ) as its API Gateway – a full fledged APIs program to manage all operations. Anyone who has an Amazon account, can use its MWS API service.
Get Amazon API Access Keys
To obtain amazon access keys, you need to sign up for amazon web service account, this account is different from your shopping account.
Sign up here for amazon web service access: aws.amazon.com
Once your account is ready than access the security credential page. Here
you can create new amazon api access keys.
Just click on the “Create New Access Key” option, after complete this process, you will get Access Key ID and Secret Key.
Amazon MWS Submit Feed Process
Amazon has an Feeds API section, which allow you to upload Product, inventory and order data to Amazon.
This feed operations work on the basis of XML or Flat file. Using SubmitFeed API call, upload feed data to amazon.
Lets start with SubmitFeed to Add Products to Amazon account.
First we are going to create XML feed with Products data. Check Amazon feed api documentation
See below sample Product XML Feed. You can use this feed to upload products data to amazon account.
For multiple products data use <Message>…</Message> repeatedly
Amazon MWS API Submit Feed Code Example
Now we are going to write SubmitFeed API call, which will upload this xml feed.
Check below code to Add products via SubmitFeed.
After execute above SubmitFeed script, Amazon MWS returns an XML response which contains the response to a successful request or subscription. If the request is unsuccessful, the main response element is ErrorResponse.
On success you will get the “FeedSubmissionId“. You can test the feed response via this ID. Check it out this “GetFeedSubmissionList” operation. This API call result show you that feed is processed completely or not.
You can use above script for another Feed Type operations, just change the “Action” parameter value and make xml feed according to it.