---
title: "Update coupon by its id"
method: PUT
path: "/coupons/{couponId}"
tags: ["Coupon"]
---

# Update coupon by its id

`PUT /coupons/{couponId}`

Update coupon by its id

## Path parameters

- `couponId` integer, required

## Request body

- AddCoupon
  - `user_id` integer, required
  - `restaurant_id` integer, required
  - `coupon_code` string, required
  - `discount` number, float, required
  - `is_flat_discount_in_amount` boolean, required
  - `no_of_quantity_allowed` integer
  - `validity_start_date` string, date
  - `validity_end_date` string, date
  - `maximum_discount_amount` number, float, required
  - `is_active` boolean, required

## Response `200`

Coupon updated

- Coupon
  - `id` integer
  - `created_at` string
  - `updated_at` string
  - `user_id` integer
  - `restaurant_id` integer
  - `coupon_code` string
  - `discount` number, float
  - `is_flat_discount_in_amount` integer
  - `no_of_quantity_allowed` integer
  - `no_of_quantity_used` integer
  - `validity_start_date` string, date
  - `validity_end_date` string, date
  - `maximum_discount_amount` number, float
  - `is_active` integer

## Other responses

- `default` — Unexpected error

---

[API](https://skmtc.net/agriya/apis/ofos-api-endpoints.md) · [All operations](https://skmtc.net/agriya/apis/ofos-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agriya/ofos-api-endpoints/versions/8db13a44d758/schema)
