Help with OrderAdjustment XML


#1

Hey, I am wanting to use the feeds api (XML) to cancel an order and also issue a restocking fee, the XML passes when tested against the XSD files, but fails after submission with a ResultMessageCode: 18028 and a ResultDescription: The data you submitted with this item is incomplete or invalid. Please resubmit the item with all required fields completed with valid data.

<?xml version='1.0'?>
<AmazonEnvelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='amzn-envelope.xsd'>
<Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>valid merchant id</MerchantIdentifier>
</Header>
<MessageType>OrderAdjustment</MessageType>
<Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <OrderAdjustment>
        <AmazonOrderID>valid order id</AmazonOrderID>
        <ActionType>Cancel</ActionType>
        <CODCollectionMethod>DirectPayment</CODCollectionMethod>
        <AdjustedItem>
            <AmazonOrderItemCode>valid order item code</AmazonOrderItemCode>
            <AdjustmentReason>CustomerCancel</AdjustmentReason>
            <ItemPriceAdjustments>
                <Component>
                    <Type>Principal</Type>
                    <Amount currency='USD'>0</Amount>
                </Component>
                <Component>
                    <Type>Shipping</Type>
                    <Amount currency='USD'>0.00</Amount>
                </Component>
                <Component>
                    <Type>RestockingFee</Type>
                    <Amount currency='USD'>3.00</Amount>
                </Component>
            </ItemPriceAdjustments>
            <QuantityCancelled>1</QuantityCancelled>
            <Quantity>1</Quantity>
        </AdjustedItem>
    </OrderAdjustment>
</Message>
</AmazonEnvelope>

Any help would be greatly appreciated, I am not sure what is missing or wrong with my XML file, and not sure if I am even doing the price adjustments correctly.

Thanks


#2

Why are you charging a restocking fee on a cancelled order. You can only cancel unshipped orders so a restocking fee would not apply.


#3

You can’t cancel an order if you confirmed shipment. You can only refund less restocking.