亚马逊 MWS 错误 25 - 您看到我的 XML 有错误吗?

Amazon MWS Error 25 - Do You See An Error With My XML?

我正在尝试自动确认我们的亚马逊订单的发货,但提交提要显示,"We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed."。

我已经根据此处找到的文档对其进行了检查:https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/XML_Documentation_Intl.pdf

你能看看吗?

<?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>MY-MERCHANT-ID</MerchantIdentifier>
   </Header>
   <MessageType>OrderFulfillment</MessageType>
   <Message>
      <MessageID>1</MessageID>
      <OrderFulfillment>
         <AmazonOrderID>116-8390288-9796217</AmazonOrderID>
         <MerchantOrderID>877399</MerchantOrderID>
         <FulfillmentDate>2016-12-28T22:55:27-08:00</FulfillmentDate>
         <FulfillmentData>
            <CarrierName>USPS</CarrierName>
            <ShippingMethod>Standard</ShippingMethod>
         <ShipperTrackingNumber>9400110200830414375387</ShipperTrackingNumber>
         </FulfillmentData>
         <Item>
            <AmazonOrderItemCode>40322771766298</AmazonOrderItemCode>
            <Quantity>1</Quantity>
         </Item>
      </OrderFulfillment>
   </Message>
</AmazonEnvelope>

您的 XML 未针对 XSD 进行验证。 OrderFulfillment.xsd 包含以下段落:

<xsd:choice>
     <xsd:element ref="AmazonOrderID"/>
     <xsd:element ref="MerchantOrderID"/>
</xsd:choice>

意思是,您只能提交 AmazonOrderID 您的 MerchantOrderID。仅当您在上一步中让亚马逊知道您自己的 MerchantOrderID 时,才允许使用后者。由于您的系统似乎都知道,因此没有理由不使用 AmazonOrderID.

以下 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>MY-MERCHANT-ID</MerchantIdentifier>
   </Header>
   <MessageType>OrderFulfillment</MessageType>
   <Message>
      <MessageID>1</MessageID>
      <OrderFulfillment>
         <AmazonOrderID>116-8390288-9796217</AmazonOrderID>

         <FulfillmentDate>2016-12-28T22:55:27-08:00</FulfillmentDate>
         <FulfillmentData>
            <CarrierName>USPS</CarrierName>
            <ShippingMethod>Standard</ShippingMethod>
         <ShipperTrackingNumber>9400110200830414375387</ShipperTrackingNumber>
         </FulfillmentData>
         <Item>
            <AmazonOrderItemCode>40322771766298</AmazonOrderItemCode>
            <Quantity>1</Quantity>
         </Item>
      </OrderFulfillment>
   </Message>
</AmazonEnvelope>