v1

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

Update category

The API endpoint allows users with an ADMIN role to update a category by providing the category name key in the request body and the categoryId in the URL path variable.

This functionality enables administrators to modify and manage category information within the system.

By accessing this endpoint, authorized administrators can update the specified category's name key to reflect any necessary changes or updates.

patch/ecommerce/categories/{categoryId}

Request body

namestring

Example request

{
  "name": "womens-wear"
}

Response

Update category

messagestring
statusCodenumber
successboolean

Example response

{
  "data": {
    "_id": "6478e1c2b3b51f6d24e0aa5b",
    "createdAt": "2023-06-01T18:21:54.762Z",
    "name": "new name",
    "owner": "6476e34ebe1cfb9cc08bd446",
    "updatedAt": "2023-06-02T05:59:36.237Z"
  },
  "message": "Category updated successfully",
  "statusCode": 200,
  "success": true
}