1

I need any sample working XML for upload an item using walmart api.

I have tried a lot to create an XML but no success.

Below is my testing XML Data.

    <?xml version="1.0" encoding="UTF-8" ?>
<MPItemFeed xmlns="http://walmart.com/">
    <MPItemFeedHeader>
        <version>3.1</version>
    </MPItemFeedHeader>
    <MPItem>
        <sku>78350426190609</sku>
        <processMode>CREATE</processMode>
        <productIdentifiers>
            <productIdentifier>
                <productIdType>UPC</productIdType>
                <productId>78350426113604</productId>
            </productIdentifier>
        </productIdentifiers>
        <MPProduct>
            <productName>Electronic Cables_ Update3</productName>
            <ProductIdUpdate>Yes</ProductIdUpdate>
            <SkuUpdate>No</SkuUpdate>
            <category>
                <Electronics>
                    <ElectronicsCables>
                        <shortDescription>new United Facility Supply High-Volume Wrapping paper this is change to Partial update on    PROMode is REPLACE_ALL</shortDescription>
                        <manufacturer>ECManu</manufacturer>
                        <manufacturerPartNumber>ECManu0354</manufacturerPartNumber>
                        <modelNumber>ECMan49_update</modelNumber>
                        <brand>NewECB brand</brand>
                        <mainImageUrl>https://i5.walmartimages.com/asr/d225a57c-18fa-46f1-b160-7e61a6fae8b1_1.487e4418d1c56266742b8a6942a3ac5e.jpeg</mainImageUrl>
                        <productSecondaryImageURL>
                            <productSecondaryImageURLValue>https://i5.walmartimages.com/asr/414422b1-b13a-40b5-9bdc-adfe24a0bad8_1.3473a55982153dc1dfb17294123124f5.jpeg</productSecondaryImageURLValue>
                        </productSecondaryImageURL>
                        <color>Blue</color>
                        <cableLength>
                            <measure>18.00</measure>
                            <unit>in</unit>
                        </cableLength>
                        <batteryTechnologyType>Alkaline</batteryTechnologyType>
                        <isProp65WarningRequired>No</isProp65WarningRequired>
                    </ElectronicsCables>
                </Electronics>
            </category>
        </MPProduct>
    </MPItem>
</MPItemFeed>

I am getting this response.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:PartnerFeedResponse xmlns:ns2="http://walmart.com/">
  <ns2:feedId>A9CCFBD2054B43859744FE50DFADB9B3@AQMBAAA</ns2:feedId>
  <ns2:feedStatus>PROCESSED</ns2:feedStatus>
  <ns2:ingestionErrors/>
  <ns2:itemsReceived>1</ns2:itemsReceived>
  <ns2:itemsSucceeded>0</ns2:itemsSucceeded>
  <ns2:itemsFailed>1</ns2:itemsFailed>
  <ns2:itemsProcessing>0</ns2:itemsProcessing>
  <ns2:offset>0</ns2:offset>
  <ns2:limit>50</ns2:limit>
  <ns2:itemDetails/>
</ns2:PartnerFeedResponse>

How can I fix the above XML data?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Khaild Bashir
  • 37
  • 1
  • 1
  • 5
  • First, XML is not code but data. And this question is not clear as we do not know how the API works. Is there a specific format it requires? And how are you using it? To retrieve their data? Import your data? Show PHP code. – Parfait Jul 20 '17 at 14:52
  • I am following this link. https://servicii-informatice.ro/php-script-uploadupdate-walmart-products-api/ – Khaild Bashir Jul 20 '17 at 14:56
  • Well, what error messages are you getting? – ShaneOH Jul 20 '17 at 15:31

2 Answers2

2

Swap the positions of the processMode and sku tags like so:

<MPItem>
    <processMode>CREATE</processMode>
    <sku>78350426190609</sku>
    <productIdentifiers>

You can find the current XSDs at https://developer.walmart.com/xsd/V3-Spec-Item-3.1-XSD.zip

-

You may want to look into an XML validator to help find errors like this.

toastifer
  • 478
  • 3
  • 8
1

The below XML is a sample XML for v3 item feed for Walmart Product Upload

<?xml version="1.0"?>
<MPItemFeed xmlns="http://walmart.com/">
  <MPItemFeedHeader>
    <version>3.1</version>
    <mart>WALMART_CA</mart>
    <locale>en_CA</locale>
  </MPItemFeedHeader>
  <MPItem>
    <sku>437764</sku>
    <productIdentifiers>
      <productIdentifier>
        <productIdType>UPC</productIdType>
        <productId>028617433790</productId>
      </productIdentifier>
    </productIdentifiers>
    <MPProduct>
      <productName>Bistro Chalk Marker Chisel Tip-Silver 483-C-SLV</productName>
      <ProductIdUpdate>No</ProductIdUpdate>
      <SkuUpdate>No</SkuUpdate>
      <category>
        <ArtAndCraftCategory>
          <ArtAndCraft>
            <shortDescription>Bistro Chalk Marker Chisel Tip-Silver 483-C-SLV</shortDescription>
            <brand>Uchida</brand>
            <mainImageUrl>https://www.stuff4crafts.com/media/catalog/product/4/3/437764.jpg</mainImageUrl>
          </ArtAndCraft>
        </ArtAndCraftCategory>
      </category>
    </MPProduct>
    <MPOffer>
      <price>3.99</price>
      <MinimumAdvertisedPrice>3.99</MinimumAdvertisedPrice>
      <ShippingWeight>
        <measure>0.8000</measure>
        <unit>lb</unit>
      </ShippingWeight>
      <ProductTaxCode>2038710</ProductTaxCode>
    </MPOffer>
  </MPItem>
</MPItemFeed>

processMode is default CREATE . You can either use it or skip it. If used it should be above tag.

CedCommerce
  • 1
  • 4
  • 11