I’m working on a stock control system and the client wishes to export their listings to their Amazon Marketplace account. So far, I've come across the SubmitFeed endpoint. However, all of the examples I look at only show an example of submitting a single product.
As Amazon’s documentation states you can only have so many active feeds at a time, I would have thought you would have been able to send multiple products in a single feed so you're not exhausting the feed limit, as I imagine power sellers will want to list dozens—maybe even hundreds—of products at a time.
I’m currently sending an XML documentation that contains one <Message>
element, i.e.
<?xml version="1.0" encoding="UTF-8"?>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>56789</SKU>
<StandardProductID>
<Type>ASIN</Type>
<Value>B0EXAMPLEG</Value>
</StandardProductID>
<ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
<DescriptionData>
<Title>Example Product Title</Title>
<Brand>Example Product Brand</Brand>
<Description>This is an example product description.</Description>
<BulletPoint>Example Bullet Point 1</BulletPoint>
<BulletPoint>Example Bullet Point 2</BulletPoint>
<MSRP currency="USD">25.19</MSRP>
<Manufacturer>Example Product Manufacturer</Manufacturer>
<ItemType>example-item-type</ItemType>
</DescriptionData>
<ProductData>
<Health>
<ProductType>
<HealthMisc>
<Ingredients>Example Ingredients</Ingredients>
<Directions>Example Directions</Directions>
</HealthMisc>
</ProductType>
</Health>
</ProductData>
</Product>
</Message>
The <MessageID>
element suggests I’m able to specify multiple “messages” in a feed, but I’m not sure on the syntax as I would expect the <Message>
to be inside a <Messages>
element, in which I could specify multiple messages.
How can I specify additional messages and thus additional products? Or am I going down the wrong track?
You need to send multiple Message
s in one AmazonEnvelope
:
<?xml version="1.0" encoding="utf-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>MERCHANTID</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
....
</Product>
</Message>
<Message>
<MessageID>2</MessageID>
<OperationType>Update</OperationType>
<Product>
....
</Product>
</Message>
</AmazonEnvelope>
All messages in one feed need to be of the same MessageType
(e.g you cannot mix Product messages with Inventory data) and have a MessageID
unique to this feed.