v1

latestOpenAPI 3.0.3raw.githubusercontent.com2024-10-2916802.4 MB
🛒 Ecommerce

Delete category

The API endpoint allows an administrator to delete a category by providing the categoryId as a path variable in the URL.

This functionality is specific to users with an ADMIN role and is designed to facilitate category management tasks.

By accessing this endpoint and specifying the categoryId, the category associated with that ID will be permanently deleted from the system.

delete/ecommerce/categories/{categoryId}

Response

Delete category

messagestring
statusCodenumber
successboolean

Example response

{
  "data": {
    "deletedCategory": {
      "_id": "6478dcdc025e3dd56c7acb79",
      "createdAt": "2023-06-01T18:01:00.470Z",
      "name": "mens-wear",
      "owner": "6476e34ebe1cfb9cc08bd446",
      "updatedAt": "2023-06-01T18:01:00.470Z"
    }
  },
  "message": "Category deleted successfully",
  "statusCode": 200,
  "success": true
}