v1

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

Remove sub image

The API enables an ADMIN user to remove sub-images associated with a product by providing productId and subImageId.

It provides functionality for the frontend to offer the ADMIN user an option to manage the sub-images of a product.

Using this API, the ADMIN user can remove specific sub-images from the product, thereby allowing them to effectively control and update the visual representation of the product.

patch/ecommerce/products/remove/subimage/{productId}/{subImageId}

Response

Remove sub image

messagestring
statusCodenumber
successboolean

Example response

{
  "data": {
    "_id": "647c6059fe873dfa3c256fc3",
    "category": "647c406165391b736260db2b",
    "createdAt": "2023-06-04T09:58:49.324Z",
    "description": "Updated desc",
    "mainImage": {
      "_id": "647c65f480ce658300aead44",
      "localPath": "public/images/cover_image.png-168587416443763118173.png",
      "url": "http://localhost:8080/images/cover_image.png-168587416443763118173.png"
    },
    "name": "Updated",
    "owner": "647c5d68a1ce9c25a8033233",
    "price": 1234,
    "stock": 20,
    "subImages": [],
    "updatedAt": "2023-06-04T10:25:46.846Z"
  },
  "message": "Sub image removed successfully",
  "statusCode": 200,
  "success": true
}