具有关系的亚马逊 MWS 产品提要

Amazon MWS Product Feed With Relationships

我能够使用此 feed.xml 文件成功将我的产品上传到亚马逊。

<?xml version="1.0" encoding="iso-8859-1"?>
<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>
  <PurgeAndReplace>false</PurgeAndReplace>
  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <Product>
      <SKU>56791</SKU>
      <StandardProductID>
        <Type>UPC</Type>
        <Value>1234567890</Value>
      </StandardProductID>
      <Condition>   
        <ConditionType>New</ConditionType>
      </Condition>
      <DescriptionData>
        <Title>Yougurt Covered Raisins 300</Title>
        <Brand>Valued Naturals</Brand>
        <Description>Quality you can see and taste</Description>
        <BulletPoint>Contains milk and soy</BulletPoint>
        <BulletPoint>Gluten Free</BulletPoint>
        <BulletPoint>Kosher</BulletPoint>
        <Manufacturer>IFood</Manufacturer>
        <ItemType>raisins</ItemType>
      </DescriptionData>
      <ProductData>
        <FoodAndBeverages>
          <ProductType>
            <Food>
              <VariationData>
                        <Parentage>parent</Parentage> 
                        <VariationTheme>Size</VariationTheme>
                        <Size>100</Size>
                    </VariationData>
              <UnitCount unitOfMeasure="GR">396</UnitCount>
            </Food>
          </ProductType>
        </FoodAndBeverages>
      </ProductData>
    </Product>
  </Message>

<Message>
    <MessageID>2</MessageID>
    <OperationType>Update</OperationType>
    <Product>
      <SKU>56791-300</SKU>
      <StandardProductID>
        <Type>UPC</Type>
        <Value>1234567890</Value>
      </StandardProductID>
      <Condition>   
            <ConditionType>New</ConditionType>
        </Condition>
      <DescriptionData>
        <Title>Yougurt Covered Raisins 300gr</Title>
        <Brand>Valued Naturals</Brand>
        <Description>Quality you can see and taste</Description>
        <BulletPoint>Contains milk and soy</BulletPoint>
        <BulletPoint>Gluten Free</BulletPoint>
        <BulletPoint>Kosher</BulletPoint>
        <Manufacturer>IFood</Manufacturer>
        <ItemType>raisins</ItemType>
      </DescriptionData>
      <ProductData>
        <FoodAndBeverages>
          <ProductType>
            <Food>
              <VariationData>
                <Parentage>child</Parentage> 
                <VariationTheme>Size</VariationTheme>
                <Size>100</Size>
              </VariationData>
              <UnitCount unitOfMeasure="GR">396</UnitCount>
            </Food>
          </ProductType>
        </FoodAndBeverages>
      </ProductData>
    </Product>
  </Message>
  <Message>
    <MessageID>3</MessageID>
    <OperationType>Update</OperationType>
    <Product>
      <SKU>56791-100</SKU>
      <StandardProductID>
        <Type>UPC</Type>
        <Value>1234567890</Value>
      </StandardProductID>
      <Condition>   
            <ConditionType>New</ConditionType>
        </Condition>
      <DescriptionData>
        <Title>Yougurt Covered Raisins 100gr</Title>
        <Brand>Valued Naturals</Brand>
        <Description>Quality you can see and taste</Description>
        <BulletPoint>Contains milk and soy</BulletPoint>
        <BulletPoint>Gluten Free</BulletPoint>
        <BulletPoint>Kosher</BulletPoint>
        <Manufacturer>IFood</Manufacturer>
            <ItemType>raisins</ItemType>
      </DescriptionData>
      <ProductData>
        <FoodAndBeverages>
          <ProductType>
            <Food>
              <VariationData>
                    <Parentage>child</Parentage> 
                    <VariationTheme>Size</VariationTheme>
                    <Size>100</Size>
                    </VariationData>
              <UnitCount unitOfMeasure="GR">100</UnitCount>
            </Food>
          </ProductType>
        </FoodAndBeverages>
      </ProductData>
    </Product>
  </Message>
</AmazonEnvelope> 

收到来自亚马逊的成功消息后,我不得不 post 请求定义产品之间的关系,将第二个和第三个产品设置为第一个产品的子产品,如下所示:

<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
  <Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>MYMERCHANTID</MerchantIdentifier>
  </Header>
  <MessageType>Relationship</MessageType>
  <PurgeAndReplace>false</PurgeAndReplace>

  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <Relationship>
      <ParentSKU>56791</ParentSKU>
      <Relation>
        <SKU>56791-300</SKU>
        <Type>Variation</Type>
      </Relation>
      <Relation>
        <SKU>56791-100</SKU>
        <Type>Variation</Type>
      </Relation>
    </Relationship>
  </Message>
</AmazonEnvelope>

现在我想知道是否可以在单个请求中定义所有这些父子关系,例如在第一个 feed.xml 文件中放置一些额外的数据?

遗憾的是你不能。 MessageType 在 AmazonEnvelope 中必须是唯一的。您的一个信封是 Product 类型,另一个是 Relatonship 类型。