Delete Product
Permanently deletes a product. Category and brand product counts are updated automatically.
HTTP Request
- URL:
/products/{id} - Method:
DELETE - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_WRITE_PRODUCT
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | Required. The ID of the product to delete. |
cURL Example
curl --location --request DELETE '<BASE_URL>/products/6703a1c4e1d2f3a4b5c6d7e8' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The product was deleted successfully.
- 400 Bad Request: The access token is missing or invalid, or the product ID is not valid.
Sample JSON Response
{
"success": true,
"message": "Product deleted successfully"
}
Response Details
| Field | Type | Description |
|---|---|---|
success | Boolean | true when the request succeeded. |
message | String | Confirmation message. |
Notes
- Deleting a product cannot be undone.