Deleting Products
How to delete one, several, or all products from a Stream.
We have two different endpoints that let clients delete product data:
/streams/{streamId}/products— supports the deletion of one, several, or all products via the request body/streams/{streamId}/products/{productId}— supports the deletion of a single product via URL
Delete products via the request body
Delete a single product:
curl --location --request DELETE 'https://stream-api.productsup.com/streams/124773/products' \
--header 'Content-Type: application/x-ndjson' \
--header 'Accept: application/vnd.api+json' \
--data-raw '{"id":34SKJDF42DF}'Delete multiple products:
curl --location --request DELETE 'https://stream-api.productsup.com/streams/124773/products' \
--header 'Content-Type: application/x-ndjson' \
--header 'Accept: application/vnd.api+json' \
--data-binary @- <<EOF
{"id":"34SKJDF42DF"}
{"id":"475-SHIRT-XL"}
{"id":7824796324}
EOFDelete all products:
curl --location --request DELETE 'https://stream-api.productsup.com/streams/124773/products?all=true' \
--header 'Accept: application/vnd.api+json'You can delete one or several products by:
- Sending a request to the endpoint
/streams/{streamId}/products - Sending a request body with list of
id-attributes for the products that you want to remove.
In case you want to delete all products, you need to add the query
parameter and value all=true to the URL. In this case, you can omit
the request body.
Note that by default the Platform does not import from an empty Data Source. When deleting all the data in the Stream API and an import is run it will fail unless new data has been pushed. Follow these instructions to enable importing from an empty Data Source.
Delete a product via the URL
Delete a single product:
curl --location --request DELETE 'https://stream-api.productsup.com/streams/124773/products/475-SHIRT-XL' \
--header 'Accept: application/vnd.api+json'Delete single products by making a request to /streams/{streamId}/products/{productId}.
How is this guide?