---
title: "Create coupon"
method: POST
path: "/ecommerce/coupons"
tags: ["🛒 Ecommerce"]
---

# Create coupon

`POST /ecommerce/coupons`

The API allows users with an `ADMIN` role to create a coupon.

This API endpoint accepts the necessary information for creating a coupon, such as the coupon code, discount amount, expiration date, and any additional conditions.

The endpoint performs authentication and authorization checks to ensure that only users with the `ADMIN` role can access it.

## Request body

- object
  - `name` string
  - `couponCode` string
  - `type` 'FLAT'
  - `discountValue` number
  - `minimumCartValue` number
  - `expiryDate` string, date-time
  - `startDate` string, date-time

## Response `201`

Create coupon

- 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)
