---
title: "Update coupon"
method: PATCH
path: "/ecommerce/coupons/{couponId}"
tags: ["🛒 Ecommerce"]
---

# Update coupon

`PATCH /ecommerce/coupons/{couponId}`

The API allows an `ADMIN` role user to update a coupon by sending the required data in the request body and specifying the `couponId` in the path variable.

This endpoint grants authorized users the ability to modify existing coupon details, such as its code, discount amount, expiration date, or any other relevant attributes.

## Request body

- object
  - `couponCode` string
  - `discountValue` number
  - `name` string

## Response `201`

Update coupon

- object
  - `data` object
    - `__v` number
    - `_id` string
    - `couponCode` string
    - `createdAt` string
    - `discountValue` number
    - `expiryDate` string
    - `minimumCartValue` number
    - `name` string
    - `owner` string
    - `startDate` string
    - `type` string
    - `updatedAt` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/versions/a9f3a290e4dc/schema)
