Reputation: 141
I'm using the Amazon MWS feeds API to submit a feed, here is the 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.02</DocumentVersion>
<MerchantIdentifier>xxx</MerchantIdentifier>
</Header>
<MessageType>OrderAdjustment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAdjustment>
<AmazonOrderID>xxx</AmazonOrderID>
<ActionType>Refund</ActionType>
<AdjustedItem>
<AmazonOrderItemCode>xxx</AmazonOrderItemCode>
<AdjustmentReason>GeneralAdjustment</AdjustmentReason>
</AdjustedItem>
</OrderAdjustment>
</Message>
</AmazonEnvelope>
And I got the response as below:
<?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.02</DocumentVersion>
<MerchantIdentifier>A1B4GJWW9XJ35M</MerchantIdentifier>
</Header>
<MessageType>ProcessingReport</MessageType>
<Message>
<MessageID>1</MessageID>
<ProcessingReport>
<DocumentTransactionID>282020017464</DocumentTransactionID>
<StatusCode>Complete</StatusCode>
<ProcessingSummary>
<MessagesProcessed>1</MessagesProcessed>
<MessagesSuccessful>0</MessagesSuccessful>
<MessagesWithError>1</MessagesWithError>
<MessagesWithWarning>0</MessagesWithWarning>
</ProcessingSummary>
<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>
</ProcessingReport>
</Message>
</AmazonEnvelope>
Questions: 1. If I want to refund this order fully can I ignore the section? 2. In this order I do have only 1 item, I'm not sure if I use the correct , I got this from the order api OrderItemId
Upvotes: 1
Views: 1516
Reputation: 2069
Your error says
We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed.
That means the structure of your XML is invalid in some way.
After looking at the documentation, it seems if you want to cancel the order entirely, you have to use the order acknowledgement feed.
If you want to issue a partial refund or cancel one item in the order, you can use the order adjustment feed, which you have in your example.
According the the XSD for order adjustments, you seem to missing ItemPriceAdjustments from the feed you are submitting.
Amazon needs to know how much to adjust the order for each item and you can get as granular as you need.
Upvotes: 0