curl --location --request DELETE 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "product",
"deleted": true
}
Delete a product from the catalog
curl --location --request DELETE 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "product",
"deleted": true
}
curl --location --request DELETE 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
"id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "product",
"deleted": true
}
{
"error": {
"type": "product_has_orders",
"message": "Cannot delete product with existing orders. Archive the product instead.",
"code": "PRODUCT_HAS_ORDERS"
}
}