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

# Update coupon active status

`PATCH /ecommerce/coupons/status/{couponId}`

The API endpoint allows an administrator role user to update the activity status of a coupon.

It expects a request with a path variable `couponId` indicating the specific coupon to update. In the request body, there should be a `isActive` key, which is a boolean value indicating the desired status of the coupon.

When this API is called, it toggles the active status of the coupon. This functionality allows the administrator to enable or disable the use of certain coupon codes in the application.

## Request body

- object
  - `isActive` boolean

## Response `200`

Update coupon active status

- object
  - `data` object
    - `__v` number
    - `_id` string
    - `couponCode` string
    - `createdAt` string
    - `discountValue` number
    - `expiryDate` string
    - `isActive` boolean
    - `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/revisions/a9f3a290e4dc/schema)
