MWS rejecting Order Fulfillment Feed


#1

I’ve been trying to figure out where I’ve been going wrong here. I’m submitting the following (PII removed)

<?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>AXXXXXXXX</MerchantIdentifier>
	</Header>
	<MessageType>OrderFulfillment</MessageType>
	<Message>
		<MessageID>1</MessageID>
		<OrderFulfillment>
			<AmazonOrderID>111-2222222-3333333</AmazonOrderID>
			<FulfillmentDate>2020-06-23T04:25:09-0500</FulfillmentDate>
			<FulfillmentData>
				<CarrierCode>FedEx</CarrierCode>
				<ShipperTrackingNumber>111111111111</ShipperTrackingNumber>
				<ShippingMethod>Ground</ShippingMethod>
			</FulfillmentData>
			<Item>
				<AmazonOrderItemCode>1111111111111</AmazonOrderItemCode>
				<Quantity>1</Quantity>
			</Item>
		</OrderFulfillment>
	</Message>
</AmazonEnvelope>

I’ve been reading everything I can find for the error

<ResultMessageCode>25</ResultMessageCode>
<ResultDescription>We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed.</ResultDescription>

I’ve verified that the AmazonOrderID and AmazonOrderItemCode match up, but I always get that error back. The date is formatted ISO8601 as well (yes, I have seen the myriad similar posts in these forums)


#2

The reason you are getting an error is because ShippingMethod is supposed to be before ShipperTrackingNumber.

Based on https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_4_1/OrderFulfillment.xsd the Fulfillment data must be in sequence.

https://www.w3schools.com/xml/el_sequence.asp


#3

Ah. Well, that’s one less problem then. Thanks!

I changed the order and still get the same error, however.


#4

Can you repost your request. I tested it myself and the issue was with the ordering. Once I fix the order it was processed successfully.


#5

I’ve fiddled with it in the Scratchpad and had no success. Changing the order, or even omitting that one field, has produced no results. I opened a ticket with MWS directly and all they did was feed me back the API error.


#6

Your fulfillment date format is the issue. I would suggest you just change it to UTC and send it in the following format 2020-06-22T11:25:09Z