Amazon api not deleting my products from inventory

邮差的信 提交于 2019-12-10 20:29:44

问题


I'm sending $feed =

<<<EOD
<?xml version="1.0"?>
<AmazonEnvelope xsi:noNamespaceSchemaLocation="amzn-envelope.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>XXMYMERCHANTXX</MerchantIdentifier>
  </Header>
  <MessageType>Product</MessageType>
EOD;
foreach($skus as $k => $v) {
$feed = $feed . <<<EOD

  <Message>
    <MessageID>$count</MessageID>
    <OperationType>Delete</OperationType>
    <Product>
      <SKU>$k</SKU>
    </Product>
  </Message>
EOD;
$count++;
}
$feed = $feed . <<<EOD
</AmazonEnvelope>
EOD;

as _POST_PRODUCT_DATA_

I get the report result which is:

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

However when I check my inventory online and/or download another inventory list from amazon, the skus I've just sent the delete request for are still there. I'm read and re-read the guide and I'm sure I'm sending everything correctly, which is reinforced by the success messages in the report. Any ideas?

Thanks


回答1:


try this https://temboo.com/library/Library/Amazon/Marketplace/Feeds/DeleteInventoryItems/ its really good library for many APIs



来源:https://stackoverflow.com/questions/27291453/amazon-api-not-deleting-my-products-from-inventory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!