---
title: "Delete product"
method: DELETE
path: "/ecommerce/products/{productId}"
tags: ["🛒 Ecommerce"]
---

# Delete product

`DELETE /ecommerce/products/{productId}`

## Request

- Base URL: `https://api.freeapi.app/api/v1`
- URL: `https://api.freeapi.app/api/v1/ecommerce/products/{productId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/docs/ecommerce/products/:productId/delete.ts> (a function with typed inputs; its response is checked against the schema)

The API allows an authenticated user with the role of `ADMIN` to delete a product from the system.

It expects the `productId` to be passed as a path variable.

By utilizing this API, administrators can easily remove products from the inventory or catalog.

## Response `200`

Delete product

- object
  - `data` object
    - `deletedProduct` object
      - `__v` number
      - `_id` string
      - `category` string
      - `createdAt` string
      - `description` string
      - `mainImage` string
      - `name` string
      - `owner` string
      - `price` number
      - `stock` number
      - `subImages` string[]
      - `updatedAt` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi.md) - [All operations](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) - [OpenAPI document](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/revisions/a9f3a290e4dc?raw)
