问题
I am working on amazon mws feed api to update the order status from my site.
when i call to SubmitFeed Api, it is submitted successfully.
But, when i call to GetFeedSubmissionResult, its returns me an error stating :
<Result>
<MessageID>1</MessageID>
<ResultCode>Error</ResultCode>
<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>
</Result>
Here is the my xml :
<?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>Maxvite Store</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<AmazonOrderID>123-5454545-5454545</AmazonOrderID>
<MerchantOrderID>123456</MerchantOrderID>
<MerchantFulfillmentID>123456</MerchantFulfillmentID>
<FulfillmentDate>12-02-2013T04:23:00Z</FulfillmentDate>
<FulfillmentData>
<CarrierCode>UPS</CarrierCode>
<ShippingMethod>UPS Ground</ShippingMethod>
<ShipperTrackingNumber>123456</ShipperTrackingNumber>
</FulfillmentData>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
Thanks in advance
回答1:
Your feed does not validate against the XSD schema. You cannot specify both AmazonOrderID and MerchantOrderID in the same feed (it is specified as choice in the OrderFulfillment.xsd)
Also, your FulfillmentDate should read 2013-02-12T04:23:00+00:00
.
The following feed is changed accordingly and does validate:
<?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>Maxvite Store</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<AmazonOrderID>123-5454545-5454545</AmazonOrderID>
<MerchantFulfillmentID>123456</MerchantFulfillmentID>
<FulfillmentDate>2013-02-12T04:23:00+00:00</FulfillmentDate>
<FulfillmentData>
<CarrierCode>UPS</CarrierCode>
<ShippingMethod>UPS Ground</ShippingMethod>
<ShipperTrackingNumber>123456</ShipperTrackingNumber>
</FulfillmentData>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
Hope this helps.
回答2:
You're missing the <item>
section:
<Item>
<MerchantOrderItemID>1234567</MerchantOrderItemID>
<MerchantFulfillmentItemID>1234567</MerchantFulfillmentItemID>
<Quantity>2</Quantity>
</Item>
Although the XSD shows minOccurs="0"
, it may required in some circumstances. (I've found some weird behaviors with some of the feeds)
That being said, the MWS forum is reporting an identical issue affecting multiple people, so it could be a MWS thing...
回答3:
Remove the tag: 123456
it should be either "AmazonOrderID" or "MerchantOrderID".
You can leave out the cantainer.
回答4:
I have changed "CarrierCode" from 'Fed Ex' to 'FedEx' - Removed the space and it is working fine now.
来源:https://stackoverflow.com/questions/16859841/amazon-mws-feed-api-issue-in-updating-order-status