亚马逊MWS XML Feed中的“一个或多个项目无效”

时间:2016-04-27 20:55:26

标签: xml amazon-web-services

这与此问题类似,但答案在我的情况下似乎不起作用:Amazon MWS Feed API Issue in updating Order status

我提交以下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>1234567</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
    <MessageID>1</MessageID>
    <OrderFulfillment>
        <AmazonOrderID>000-1111111-2222222</AmazonOrderID>
        <MerchantFullfillmentID>1234567</MerchantFullfillmentID>
        <FulfillmentDate>2016-04-27T16:13:46-05:00</FulfillmentDate>
        <FulfillmentData>
            <CarrierName>UPS</CarrierName>
            <ShippingMethod>UPS Ground</ShippingMethod>
            <ShipperTrackingNumber>1234567</ShipperTrackingNumber>
        </FulfillmentData>
        <Item>
            <MerchantOrderItemID>SKU</MerchantOrderItemID>
            <MerchantFulfillmentItemID>SKU</MerchantFulfillmentItemID>
            <Quantity>1</Quantity>
        </Item>
    </OrderFulfillment>
</Message>
</AmazonEnvelope>

我在检查供稿状态时收到此消息:

<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>

本文档中是否有明显错误?

1 个答案:

答案 0 :(得分:2)

我注意到的唯一不同的是我使用的代码:

<CarrierCode>UPS</CarrierCode>

代替你,

<CarrierName>UPS</CarrierName>

我也不认为它会导致很多问题,但你可以尝试不提交项目信息,我遇到问题并停止发送项目信息,它很有效,只是尝试切出:

    <Item>
        <MerchantOrderItemID>SKU</MerchantOrderItemID>
        <MerchantFulfillmentItemID>SKU</MerchantFulfillmentItemID>
        <Quantity>1</Quantity>
    </Item>