amazon - 如何将多个产品发送到亚马逊商城?

标签 amazon amazon-mws

我正在开发一个库存控制系统,客户希望将他们的商品信息导出到他们的亚马逊商城账户。到目前为止,我遇到了 SubmitFeed 端点。但是,我看到的所有示例都只显示了提交单个产品的示例。

正如亚马逊的文档所述,您一次只能有这么多事件提要,我原以为您可以在一个提要中发送多个产品,这样您就不会耗尽提要限制,就像我想象的那样卖家会希望一次列出数十种甚至数百种产品。

我目前正在发送一个 XML 文档,其中包含一个 <Message>元素,即

<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>

<MessageID> element 建议我可以在提要中指定多个“消息”,但我不确定语法,因为我期望 <Message><Messages> 内元素,我可以在其中指定多条消息。

如何指定附加消息和附加产品?还是我走错了路?

最佳答案

您需要在一个AmazonEnvelope中发送多个Message:

<?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>

一个 Feed 中的所有消息都必须具有相同的 MessageType(例如,您不能将产品消息与库存数据混合)并且具有此 Feed 唯一的 MessageID

关于amazon - 如何将多个产品发送到亚马逊商城?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29623883/

相关文章:

Node.js + socket.io 确定每个实例的最大客户端数量

amazon-mws - Amazon SP API 收到内部服务器错误

amazon-web-services - 使用亚马逊 MWS 按 ASIN 查找商品?

亚马逊 MWS 将订单标记为已发货

python - 通过python从HTML中提取特定信息

android - 亚马逊安卓应用市场结果

amazon-web-services - 亚马逊(600000)错误设置/关闭连接: An Existing connection was forcibly closed by remote host

java - 亚马逊 MWS - getOrders

php - MySQL:使用数据库触发器还是只使用 PHP?

javascript - Alexa 技能套件 : How to add an image to a standard card using JS