.net Amazon提交订阅源API错误

djmepvbi  于 2023-03-13  发布在  .NET
关注(0)|答案(1)|浏览(96)

我正在调用亚马逊MWS服务来更新项目的数量,但是当我调用“GetGetFeedSubmissionResult”来了解状态时,它返回了错误。我不知道这里有什么问题。
提交源请求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>SellerId</MerchantIdentifier>
  </Header>
  <MessageType>Inventory</MessageType>
  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <Inventory>
      <SKU>SKUIID1223</SKU>
      <Quantity>4</Quantity>
    </Inventory>
  </Message>
</AmazonEnvelope>

以下是GetSibmitFeedResult API的响应

<?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>Seller Id</MerchantIdentifier>
    </Header>
    <MessageType>ProcessingReport</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <ProcessingReport>
            <DocumentTransactionID>50387016369</DocumentTransactionID>
            <StatusCode>Complete</StatusCode>
            <ProcessingSummary>
                <MessagesProcessed>0</MessagesProcessed>
                <MessagesSuccessful>0</MessagesSuccessful>
                <MessagesWithError>1</MessagesWithError>
                <MessagesWithWarning>0</MessagesWithWarning>
            </ProcessingSummary>
            <Result>
                <MessageID>0</MessageID>
                <ResultCode>Error</ResultCode>
                <ResultMessageCode>5002</ResultMessageCode>
                <ResultDescription>Error validating XML document - failed to locate &quot;Product&quot; within &quot;Message&quot; element.</ResultDescription>
            </Result>
        </ProcessingReport>
    </Message>
</AmazonEnvelope>

我可以知道原因吗?

ukqbszuj

ukqbszuj1#

解决了问题,我使用了错误的FeedType,_POST_INVENTORY_AVAILABILITY_DATA是正确的。

相关问题