» Category DELETE API Documentation

Deleting specific categories

Endpoints:DELETE /admin/categories/{id}

Purpose

The DELETE /admin/categories/{id} API allows administrators to remove an existing product category from the system. This API helps maintain a clean and organized product catalog by enabling the deletion of outdated, redundant, or unused categories. By deleting a category, businesses can ensure that customers only see relevant and active product groupings, improving the overall shopping experience.

Path Parameters


Field
Type
Description
id
integer
The unique identifier of the categories

Query Parameters 

This endpoint does not have any query parameters.

Use Case

Administrators use DELETE /admin/categories/{id} when a category is no longer needed or when product offerings change. This API is useful for cleaning up obsolete categories after seasonal sales, discontinuing specific product lines, or removing duplicate categories. It allows businesses to maintain an up-to-date and streamlined product catalog while ensuring that irrelevant categories do not clutter the online store.

Request Body

No data is required for the request body.

Response

Upon successful deletion, the API typically returns a confirmation response indicating that the category has been removed. The deleted category will no longer be accessible through the system, and its associated products will no longer appear under that category. This ensures that the product catalog remains accurate and reflective of the business's current offerings. If the category cannot be deleted due to dependencies, the response may include an error message specifying the issue.

DELETE
https://wcapi.mywebcommander.com/api/v4/admin/categories/{id}
Try It Out