Deleting a product is irreversible. Products with existing orders cannot be deleted and must be archived instead.
Path Parameters
The unique identifier of the product to delete
Response
The ID of the deleted product
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 when deletion failsShow Error object properties
Type of error (e.g., “invalid_request”, “product_has_orders”)
Human-readable error message
Error code for programmatic handling
{
"error": {
"type": "product_has_orders",
"message": "Cannot delete product with existing orders. Archive the product instead.",
"code": "PRODUCT_HAS_ORDERS"
}
}