View Categories

Product Delete

2 min read

The product delete API removes a single product from your Releva catalogue. Once it is gone, it stops appearing in recommenders, on-site search, product blocks and advertising feeds.

Do I need to call it? #

Call it whenever a product is permanently removed from your catalogue. You do not need it for a product that is merely out of stock or temporarily hidden โ€” send those through the Product Create / Update API with available: false, which keeps the product available for back-in-stock automations and keeps its history intact. A deleted product cannot trigger anything.

Request Parameters #

You may perform requests to the API using the following curl equivalent:

curl -H 'Authorization: Bearer <secretKey>' -XDELETE https://releva.ai/api/v0/products/<productId>
URLDELETE https://releva.ai/api/v0/products/{productId}
AuthenticationAuthorization: Bearer <secretKey> โ€” the secret key of the domain the product belongs to.
Request bodyNone.

Which id to send #

The id in the URL must be exactly the id you sent to the Product Create / Update API for the product you want gone โ€” character for character. Nothing else matches: not your internal SKU, not a product id derived from it, not a custom field. An id that matches no product in your catalogue deletes nothing, and the request still succeeds.

If your catalogue ids contain characters that are not URL-safe, percent-encode them in the path.

A note about variants #

Multi-variant products are sent to Releva as one product carrying a variants array, so deleting the product removes all of its variants with it. There is no call that deletes one variant: to stop selling a single variant, send the product to the Product Create / Update API with that entry removed from variants, or with its available set to false.

If you use the older integration style where each variant is sent as its own product, then each variant is a product in its own right โ€” delete them one at a time by their own ids.

What happens next #

The request is queued and answered immediately, so a 202 means the deletion was accepted, not that it has already happened โ€” it lands within a few seconds. It is permanent: there is no undelete, and the only way to bring a product back is to send it again through the Product Create / Update API.

Two things will silently re-create a product you have just deleted, so check both before you conclude a deletion did not work:

  1. Any later Product Create / Update call that still includes the product. Delete it from your own catalogue first, or stop sending it.
  2. The Periodical Product Sync, if your sync endpoint still lists the product. The next full pass writes it straight back.

The reverse is also worth knowing: a product that disappears from your periodical sync is deleted automatically after a successful pass, so for shops with the sync in place this endpoint is only needed when you want the removal to take effect immediately rather than at the next pass.

Response Format #

A successful response will return HTTP Status 202 with an empty response body ({}).

An error response will return a HTTP 4xx or 5xx status code and have the following structure:

{
  "message": "A description of the error and how to fix it, if it's a client error."
}
StatusMeaning
202Accepted. The product is removed within a few seconds. An id that matches nothing in your catalogue is also answered with 202 โ€” the call is safe to repeat.
400The Authorization header is missing, malformed, or does not match a known domain.
402The domain is disabled. Please reach out to support@releva.ai to enable it.