0

我正在使用亚马逊 api 来更新产品的数量,使用https://mws.amazonservices.com/scratchpad/index.html中的“ POST_FULFILLMENT_ORDER_REQUEST_DATA ”提要类型,例如,

<?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>ATVPDKIKX0DER</MerchantIdentifier>
  </Header>
  <MessageType>OrderFulfillment</MessageType>
  <Message>
   <MessageID>1</MessageID>
   <OrderFulfillment>
   <AmazonOrderID>XXXXX</AmazonOrderID>
   <FulfillmentDate>2020-09-12T11:00:00</FulfillmentDate>
   <FulfillmentData>
   <CarrierName>USPS</CarrierName>
   <ShippingMethod>Standard</ShippingMethod>
   <ShipperTrackingNumber>1234562312312</ShipperTrackingNumber>
   </FulfillmentData>
  </OrderFulfillment>
 </Message>
</AmazonEnvelope>

我试过用建议 Oneida 添加:

    <?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>ATVPDKIKX0DER</MerchantIdentifier>  
</Header>   
<MessageType>OrderFulfillment</MessageType> 
<Message>   
<MessageID>1</MessageID>    
<OrderFulfillment>  
<AmazonOrderID>XXX</AmazonOrderID>  
<FulfillmentDate>2020-09-03T21:38:00+00:00</FulfillmentDate>    
<FulfillmentData>   
<CarrierCode>UPS</CarrierCode>  
<ShippingMethod>Second Day</ShippingMethod> 
<ShipperTrackingNumber>1234567890</ShipperTrackingNumber>   
</FulfillmentData>
 <Item>
            <AmazonOrderItemCode>XXX</AmazonOrderItemCode>
            <Quantity>1</Quantity>
        </Item> 
</OrderFulfillment> 
</Message>
</AmazonEnvelope>

但我得到了同样的错误无效的创建请求。

    <?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>XXXXXXXXX</MerchantIdentifier>
    </Header>
    <MessageType>ProcessingReport</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <ProcessingReport>
            <DocumentTransactionID>XXXX</DocumentTransactionID>
            <StatusCode>Complete</StatusCode>
            <ProcessingSummary>
                <MessagesProcessed>1</MessagesProcessed>
                <MessagesSuccessful>0</MessagesSuccessful>
                <MessagesWithError>1</MessagesWithError>
                <MessagesWithWarning>0</MessagesWithWarning>
            </ProcessingSummary>
            <Result>
                <MessageID>0</MessageID>
                <ResultCode>Error</ResultCode>
                <ResultMessageCode>920001</ResultMessageCode>
                <ResultDescription>Invalid creation request</ResultDescription>
            </Result>
        </ProcessingReport>
    </Message>
</AmazonEnvelope>

谁能帮我?

提前致谢。

4

1 回答 1

1

您正在遗漏 Item 元素...

    <MessageID>#</MessageID>
    <OperationType>Update</OperationType>
    <OrderFulfillment>
        <AmazonOrderID>###-#######-#######</AmazonOrderID>
        <FulfillmentDate>2020-09-09T00:00:00.00Z</FulfillmentDate>
        <FulfillmentData>
            <CarrierName>##Carrier##</CarrierName>
            <ShippingMethod>##Method##</ShippingMethod>
            <ShipperTrackingNumber>##TrackNum##</ShipperTrackingNumber>
        </FulfillmentData>
        <Item>
            <AmazonOrderItemCode>##ItemCode##</AmazonOrderItemCode>
            <Quantity>1</Quantity>
        </Item>
    </OrderFulfillment>
</Message>
于 2020-09-09T17:10:21.007 回答