Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete product from inventory on Amazon via mws api

Tags:

amazon-mws

I'm using the client libraries for Amazon MWS to retrieve competitive price info, etc. But I'd like to be able to delete products, or remove them from my inventory via the api. I am unable to find in the docs or via google how to do this.

In find no mention here http://docs.developer.amazonservices.com/en_US/dev_guide/index.html of how to remove product listings.

I do find this SO post Amazon api not deleting my products from inventory but it seems dated and I find no corresponding section in the docs for

    <OperationType>Delete</OperationType>

Any clues appreciated. Thx, Mike.

like image 927
Mike Makuch Avatar asked Mar 08 '23 23:03

Mike Makuch


1 Answers

You need to use the feed API and submit a delete request. This is what the body would look like for two skus.

<?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>YOUR-MERCHANT-IDENTIFIER-GOES-HERE</MerchantIdentifier>
  </Header>
  <MessageType>Product</MessageType>
  <Message>
    <MessageID>1</MessageID>
    <OperationType>Delete</OperationType>
    <Product>
      <SKU>YOUR-FIRST-SKU-GOES-HERE</SKU>
    </Product>
  </Message>
  <Message>
    <MessageID>2</MessageID>
    <OperationType>Delete</OperationType>
    <Product>
      <SKU>YOUR-SECOND-SKU-GOES-HERE</SKU>
    </Product>
  </Message>
</AmazonEnvelope>
like image 103
Bill H Avatar answered May 16 '23 05:05

Bill H