Skip to content

Delete Category

Soft delete a product category and all its subcategories.

Endpoint

DELETE /v1/products/category/?id={category_id}

Authentication

Required (Store role)

Query Parameters

Parameter Type Required Description
id integer Yes Category ID

Response

Success (200 OK)

{
  "success": "Deleting Category Success"
}

Error Responses

Category Not Found (404)

{
  "error": "Parent Category Not Found"
}

Missing ID Parameter (400)

{
  "message": "Param not send!"
}

Example Request

curl -X DELETE "https://api.luxmart.site/v1/products/category/?id=1" \
  -H "Authorization: Token your_access_token"

Notes

  • Performs a soft delete (sets is_deleted: true)
  • All subcategories are also soft deleted
  • Deleted categories cannot be retrieved or used