Deleting products
How to delete one, several, or all products from a stream.
2 min read
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.
To delete all products, add the query parameter all=true to the URL. You can
omit the request body.
By default the platform does not import from an empty data source, so an import run after you delete all products fails unless you push new data first. See Empty data sources to allow importing 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?