Deleting items via API

In the same way that you can register product POST and update the product PUT, it is possible to delete DELETE the item via API. It is not possible exclude the item if it is associated with the marketplace. In this case, the seller will need to log on the Skyhub portal and disconnect the product, in this way the item will be disassociated from the marketplace. To understand how to disconnect the item, follow the link in our help center explaining the process step by step:

How to connect and disconnect products?
https://goo.gl/eBYxfx
https://goo.gl/MEJsHJ
*Articles in Portuguese

If the item is not disassociated, doing DELETE returns the following error:

{ "error": "Variação possui alguma associação. Remova as associações e tente novamente." }

How do I delete a product?

To exclude items you will need to use the following Headers:

X-Api-Key: yourtoken 
X-User-Email: youremail@email.com 
Content-Type: application/json 
Accept: application/json 
x-accountmanager-key: youraccountmanager

There are two ways to exclude products, one for simple product and one for variable product.

Deleting simple product:

To delete the simple product, in addition to the Headers mentioned earlier, we use the following Endpoint: DELETE / products / {sku}

For example:

As we can see, after executing the deletion of the item, the return was 200 (SUCCESS): The request was processed successfully.

Deleting variable product:

To exclude a variation product, in addition to the Headers mentioned earlier, we use the following Endpoint: DELETE / variations / {sku}

For example:

As we can see, after executing the deletion of the item, the return was 200 (SUCCESS): The request was processed successfully.

Attention points

Before deleting an item from Skyhub, you will need to verify if there are no orders in marketplace waiting for integration with Skyhub. Why check?

If an order is pending in the marketplace and the item is excluded from Skyhub, the order will not integrate with Skyhub.

Do not forget to disconnect the Skyhub item, as shown at the beginning of the document.

Deleting the item on Skyhub will not delete the item from the marketplace.

Item exclusion in ERP / Platform (Source):

If the item is excluded from the ERP / Platform, it is very important that a Skyhub receives status: "Disabled", so that the item is disabled in Skyhub and consequently inactivated in B2W.

If you delete the item in ERP / Platform and do not send the status "Disabled" to Skyhub, the item will remain active and Skyhub will continue to ship the stock to B2W.

Last updated