1

I am using this code to ship my order on Amazon. This xml request is sent to the Amazon Marketplace Web Service, and my order gets shipped. Now I want to cancel the order using the same Web Service. But I am not sure what changes I have to make to the xml to perform the order cancel process. Can anyone help?

<cfsavecontent variable="Final_FulFillMent_XML">
    <?xml version="1.0" encoding="UTF-8"?>
    <AmazonEnvelope xsi:noNamespaceSchemaLocation="amzn-envelope.xsd" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

        <Header>
        <DocumentVersion>1.01</DocumentVersion>
        <MerchantIdentifier>xxxxxxxxxxxx</MerchantIdentifier>
    </Header>

    <MessageType>OrderFulfillment</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <OrderFulfillment>
        <AmazonOrderID>#AmazonOrderID#</AmazonOrderID>
        <MerchantFulfillmentID>#MerchantFulfillmentID#</MerchantFulfillmentID>
        <FulfillmentDate>#FulfillmentDate#</FulfillmentDate>
        <FulfillmentData><CarrierCode>#CarrierCode#</CarrierCode>
        <ShippingMethod>#ShippingMethod#</ShippingMethod>
        <ShipperTrackingNumber>#ShippingTrackingNumber#</ShipperTrackingNumber>
        </FulfillmentData></OrderFulfillment>
    </Message>
</AmazonEnvelope>
</cfsavecontent>

<cfhttp method="post" url="#FinalQueryString#">
    <cfhttpparam name="Content-Type" type="header" value="text/xml; charset=iso-8859-1">
   <cfhttpparam name="FeedContent" type="body" value="#Final_FulFillMent_XML#">
   <cfhttpparam type="header" name="Content-MD5" value="#ToBase64(BinaryDecode(Hash(Final_FulFillMent_XML), 'hex'))#">       
</cfhttp>
4

1 回答 1

1

要取消整个订单,您需要修改您可能已经发送的“订单确认提要”,并指定 a StatusCodeofFailure和 a CancelReason,例如BuyerCanceled

要取消部分订单,您需要发送“订单调整提要”,让您指定无法发货的商品数量以及原因。

Selling on Amazon: Guide to XML中描述了这两个 XML 提要

于 2013-07-09T21:48:58.803 回答