I'm trying to automate the shipping confirmation of our Amazon orders, but the submit feed says, "We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed.".
I've checked it against the documentation found here: https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/XML_Documentation_Intl.pdf
Can you please take a look?
<?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>MY-MERCHANT-ID</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<AmazonOrderID>116-8390288-9796217</AmazonOrderID>
<MerchantOrderID>877399</MerchantOrderID>
<FulfillmentDate>2016-12-28T22:55:27-08:00</FulfillmentDate>
<FulfillmentData>
<CarrierName>USPS</CarrierName>
<ShippingMethod>Standard</ShippingMethod>
<ShipperTrackingNumber>9400110200830414375387</ShipperTrackingNumber>
</FulfillmentData>
<Item>
<AmazonOrderItemCode>40322771766298</AmazonOrderItemCode>
<Quantity>1</Quantity>
</Item>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
Your XML does not validate against the XSDs.
OrderFulfillment.xsd
contains the following passage:meaning, you can only submit either an
AmazonOrderID
or yourMerchantOrderID
. The latter is only allowed if you made your ownMerchantOrderID
known to Amazon in a previous step. Since your system seems to know both, there is no reason not to use theAmazonOrderID
.The following XML feed validates and thus should work: