Getting started
Once you've installed your packages as described in the last section, you can start converting feeds. It's really simple.
Convert a feed file
Say you want to convert your POST_PRODUCT_IMAGE_FEED
into a forward-compatible JSON format. Here's all you need to do:
The third parameter, marketplaceId
, should be a valid Selling Partner API marketplace ID (full list here) corresponding to the marketplace that you're uploading the feed to.
That's it! You can now upload the file at $jsonFeedPath
to Amazon the same way you were uploading your original feed, but replacing the original feed type (POST_PRODUCT_IMAGE_FEED
) with JSON_LISTINGS_FEED
in your request.
Convert a feed file from a string
Instead of passing a file path to the converter, you can pass the feed contents to Converter::convertFromString()
instead:
Feed-specific options
There's a fourth, optional argument to Converter::convert()
and Converter::convertFromString()
: an array of feed-type-specific parameters. Some feed types do not have any extra parameters, like the POST_PRODUCT_IMAGE_FEED
used in the example above
All flat file feed types require an extra merchantId
parameter. You can find your region-specific Amazon merchant ID here.
(If you primarily sell outside the US and that merchant ID link doesn't work for you, try copying it and replacing sellercentral.amazon.com
with the Seller Central URL that you usually use.)
Here's what it looks like to pass feed-type-specific parameters:
Feed-specific parameters are defined on the individual feed type documentation pages.
Last updated