POST SUBMIT FEED SKU&量

时间:2017-09-09 09:40:03

标签: amazon-web-services amazon amazon-mws

我正在尝试发布SKU&亚马逊山姆斯的产品数量, 我的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>XYZ</MerchantIdentifier> </Header> 
<MessageType>Inventory</MessageType> <Message> 
<MessageID>1</MessageID> <OperationType>Update</OperationType> 
<Inventory> <SKU>F311020-CGDD-7.5</SKU> <Quantity>13</Quantity> 
</Inventory> </Message> </AmazonEnvelope>

当我发布xml时,我获得状态为200 ok&amp;提交成功回复,但当我在暂存器上尝试那些submitId时,我得到错误25,

<?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>XYZ</MerchantIdentifier>
    </Header>
    <MessageType>ProcessingReport</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <ProcessingReport>
<DocumentTransactionID>64542017417</DocumentTransactionID>
            <StatusCode>Complete</StatusCode>
            <ProcessingSummary>
<MessagesProcessed>1</MessagesProcessed><MessagesSuccessful>0</MessagesSuccessful>
<MessagesWithError>1</MessagesWithError><MessagesWithWarning>0</MessagesWithWarning>
            </ProcessingSummary>
            <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>
        </ProcessingReport>
    </Message>
</AmazonEnvelope>

我在这里遗漏了什么?在这里,我使用JavaScript发布数据。

1 个答案:

答案 0 :(得分:0)

我使用非常相似的XML来更新我在亚马逊上的股票,唯一的区别是“FulfillmentLatency”,你可以试试这个XML。 你在scratchPad中使用相同的XML feed吗?

<?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>$merchant_token</MerchantIdentifier>
    </Header>
    <MessageType>Inventory</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <OperationType>Update</OperationType>
        <Inventory>
            <SKU>$sku</SKU>
            <Quantity>$quantity</Quantity>
            <FulfillmentLatency>1</FulfillmentLatency>
        </Inventory>
    </Message>
</AmazonEnvelope>