Amazon api not deleting my products from inventory
Asked Answered
G

1

3

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

Garb answered 4/12, 2014 at 10:19 Comment(3)
have you tried with only one product?Yeager
I've not actually, I'll try that with a static feed and see if any difference. Thanks.Photodrama
Same result, just one success message this time but the SKU remains in my inventory.Photodrama
L
2

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

Larder answered 5/12, 2014 at 9:47 Comment(1)
Great thanks, I managed to figure out what it was after looking at the library. I wasn't sending across the marketplaceID. Thanks for the link, helpful site.Photodrama

© 2022 - 2024 — McMap. All rights reserved.