Search code examples
xmlamazon-mws

Amazon MWS _POST_ORDER_FULFILLMENT_DATA_ Not Submitting


I have looked at this so long to find whats wrong with my XML structure but maybe now cant see it for looking at it. Can anyone help?

When I run this is in the Scratchpad, after trying to submit, I keep getting "We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed."

<?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>XXXXXXXXXXXXX</MerchantIdentifier>
  </Header>
  <MessageType>OrderFulfillment</MessageType>
  <Message>
    <MessageID>1</MessageID>
    <OrderFulfillment>
      <OperationType>Update</OperationType>
      <AmazonOrderID>XXX-XXXXXXX-XXXXXXX</AmazonOrderID>
      <FulfillmentDate>2014-12-19T15:09:51+00:00</FulfillmentDate>
      <FulfillmentData>
        <CarrierName>FedEx</CarrierName>
        <ShippingMethod>Standard</ShippingMethod>
        <ShipperTrackingNumber>XXXXXXXX</ShipperTrackingNumber>
      </FulfillmentData>
      <Item>
        <AmazonOrderItemCode>XXXXXXXXXXXXXX</AmazonOrderItemCode>
        <Quantity>8</Quantity>
      </Item>
    </OrderFulfillment>
  </Message>
</AmazonEnvelope>

this was taken from the example feed on the sample :

<?xml version="1.0" encoding="UTF-8"?>
  <AmazonEnvelope xsi:noNamespaceSchemaLocation="amzn-envelope.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>123456</MerchantIdentifier>
  </Header>
  <MessageType>OrderFulfillment</MessageType>
  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <OrderFulfillment>
      <AmazonOrderID>204-3070364-1550743</AmazonOrderID>
      <FulfillmentDate>2014-07-22T23:59:59-07:00</FulfillmentDate>
      <FulfillmentData>
        <CarrierName>Contact Us for Details</CarrierName>
        <ShippingMethod>Standard</ShippingMethod>
      </FulfillmentData>
      <Item>
        <AmazonOrderItemCode>42197908407194</AmazonOrderItemCode>
        <Quantity>1</Quantity>
      </Item>
    </OrderFulfillment>
  </Message>
</AmazonEnvelope>

I have also removed "Update" as I wasn't sure this was required in the XSD.

Any help would be greatly, greatly appreciated.

Many thanks,

Jason


Solution

  • OperationType is part of Message, not part of OrderFulfillment. Switch lines 10 and 11 so that like this:

    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <OrderFulfillment>