DELETE
/
v1
/
products
/
:id
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
}
Deleting a product is irreversible. Products with existing orders cannot be deleted and must be archived instead.

Path Parameters

id
string
required
The unique identifier of the product to delete

Response

id
string
The ID of the deleted product
object
string
Always “product”
deleted
boolean
Always true for successful deletion
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 Responses

error
object
Error object when deletion fails
{
  "error": {
    "type": "product_has_orders",
    "message": "Cannot delete product with existing orders. Archive the product instead.",
    "code": "PRODUCT_HAS_ORDERS"
  }
}