沃尔玛发布API变异

时间:2017-11-08 13:52:52

标签: java xml walmart-api

我的产品具有不同的颜色变化和尺寸变化。我需要将其作为具有变体的单个产品推出。是否有相同的xml可用于此?

我从{{3}}

获得了当前的XSD

任何人都可以帮助我吗?

1 个答案:

答案 0 :(得分:1)

请浏览此链接: https://developer.walmart.com/#/apicenter/marketPlace/latest?country=us#bulkCreateUpdateItems
以下是一个示例xml可能会对您有所帮助:

<MPItemFeed xsi:schemaLocation="http://walmart.com/MPItem.xsd ">
    <MPItemFeedHeader>
        <version>3.1</version>
        <requestId>xxxx</requestId>
        <requestBatchId>xxxxxxxx</requestBatchId>
        <feedDate>2017-10-25T08:31:33</feedDate>
        <mart>WALMART_US</mart>
    </MPItemFeedHeader>
    <MPItem>
        <processMode>CREATE</processMode>
        <feedDate>2017-10-25T08:31:34</feedDate>
        <sku>xxxxxxx</sku>
        <productIdentifiers>
            <productIdentifier>
                <productIdType>UPC</productIdType>
                <productId>xxxx</productId>
            </productIdentifier>
        </productIdentifiers>
        <MPProduct>
            <SkuUpdate>No</SkuUpdate>
            <msrp>32</msrp>
            <ProductIdUpdate>Yes</ProductIdUpdate>
            <productName> Embroidered  Top</productName>
            <additionalProductAttributes>
                <additionalProductAttribute>
                    <productAttributeName>clothingSize</productAttributeName>
                    <productAttributeValue>XS</productAttributeValue>
                </additionalProductAttribute>
            </additionalProductAttributes>
            <category>
                <ClothingCategory>
                    <Clothing>
                        <shortDescription>xxx</shortDescription>
                        <brand>free people</brand>
                        <manufacturer>free people</manufacturer>
                        <pieceCount>1</pieceCount>
                        <mainImageUrl>http://abc.jpg</mainImageUrl>
                        <color>White</color>
                        <pattern>Floral</pattern>
                        <gender>Female</gender>
                        <clothingSize>XS</clothingSize>
                        <variantAttributeNames>
                            <variantAttributeName>clothingSize</variantAttributeName>
                        </variantAttributeNames>
                        <variantGroupId>It should be Same For All Varaiations</variantGroupId>
                        <isPrimaryVariant>Yes</isPrimaryVariant>
                        <isProp65WarningRequired>No</isProp65WarningRequired>
                        <clothingTopStyle>Tank</clothingTopStyle>
                        <dressShirtSize>Tank</dressShirtSize>
                        <sleeveStyle>Spaghetti Strap</sleeveStyle>
                        <occasion>Casual</occasion>
                        <keywords>loose fit,traditional wear,summer,swing,halter,cotton </keywords>
                        <swatchImages>
                            <swatchImage>
                                <swatchVariantAttribute>pattern</swatchVariantAttribute>
                                <swatchImageUrl>http://abv.jpg</swatchImageUrl>
                            </swatchImage>
                        </swatchImages>
                        <productSecondaryImageURL>
                            <productSecondaryImageURLValue>http://xyz.jpg</productSecondaryImageURLValue>
                            <productSecondaryImageURLValue>http://xss.jpg</productSecondaryImageURLValue>
                            <productSecondaryImageURLValue>http://abc.jpg</productSecondaryImageURLValue>
                        </productSecondaryImageURL>
                    </Clothing>
                </ClothingCategory>
            </category>
        </MPProduct>
        <MPOffer>
            <price>32</price>
            <StartDate>2017-10-25</StartDate>
            <EndDate>2021-01-01</EndDate>
            <ShippingWeight>
                <measure>0.0</measure>
                <unit>lb</unit>
            </ShippingWeight>
            <ProductTaxCode>2038356</ProductTaxCode>
        </MPOffer>
    </MPItem>
    <MPItem>
        <processMode>CREATE</processMode>
        <feedDate>2017-10-25T08:31:34</feedDate>
        <sku>888374256120</sku>
        <productIdentifiers>
            <productIdentifier>
                <productIdType>UPC</productIdType>
                <productId>xxxx</productId>
            </productIdentifier>
        </productIdentifiers>
        <MPProduct>
            <SkuUpdate>No</SkuUpdate>
            <msrp>32</msrp>
            <ProductIdUpdate>Yes</ProductIdUpdate>
            <productName>Free People Women's White Blue Embroidered Camisole Top</productName>
            <additionalProductAttributes>
                <additionalProductAttribute>
                    <productAttributeName>clothingSize</productAttributeName>
                    <productAttributeValue>S</productAttributeValue>
                </additionalProductAttribute>
            </additionalProductAttributes>
            <category>
                <ClothingCategory>
                    <Clothing>
                        <shortDescription>fdfdm</shortDescription>
                        <brand>free people</brand>
                        <manufacturer>free people</manufacturer>
                        <pieceCount>1</pieceCount>
                        <mainImageUrl>http://ssm.jpg</mainImageUrl>
                        <color>White</color>
                        <pattern>Floral</pattern>
                        <gender>Female</gender>
                        <clothingSize>S</clothingSize>
                        <variantAttributeNames>
                            <variantAttributeName>clothingSize</variantAttributeName>
                        </variantAttributeNames>
                        <variantGroupId>It should be same for all variations</variantGroupId>
                        <isPrimaryVariant>No</isPrimaryVariant>
                        <isProp65WarningRequired>No</isProp65WarningRequired>
                        <clothingTopStyle>Tank</clothingTopStyle>
                        <dressShirtSize>Tank</dressShirtSize>
                        <sleeveStyle>Spaghetti Strap</sleeveStyle>
                        <occasion>Casual</occasion>
                        <keywords>loose fit,traditional wear,summer,swing,halter,cotton </keywords>
                        <swatchImages>
                            <swatchImage>
                                <swatchVariantAttribute>pattern</swatchVariantAttribute>
                                <swatchImageUrl>http://ggg.jpg</swatchImageUrl>
                            </swatchImage>
                        </swatchImages>
                        <productSecondaryImageURL>
                            <productSecondaryImageURLValue>http://vvv.jpg</productSecondaryImageURLValue>
                        </productSecondaryImageURL>
                    </Clothing>
                </ClothingCategory>
            </category>
        </MPProduct>
        <MPOffer>
            <price>32</price>
            <StartDate>2017-10-25</StartDate>
            <EndDate>2021-01-01</EndDate>
            <ShippingWeight>
                <measure>0.0</measure>
                <unit>lb</unit>
            </ShippingWeight>
            <ProductTaxCode>2038356</ProductTaxCode>
        </MPOffer>
    </MPItem>
</MPItemFeed>