---
title: "Update Discount"
method: PUT
path: "/api/v1/discounts/{id}"
tags: ["Discounts"]
---

# Update Discount

`PUT /api/v1/discounts/{id}`

## Path parameters

- `id` string, required

## Request body

- object
  - `discount` union, required
    - DefaultDiscountClientUpdateSchema
      - `id` string, required
      - `name` string
      - `code` string, required — The discount code, must be unique and between 3 and 20 characters.
      - `amount` integer, required — A positive integer
      - `amountType` 'percent' | 'fixed', required
      - `active` boolean
      - `duration` 'once', required
      - `numberOfPayments` unknown
    - NumberOfPaymentsDiscountClientUpdateSchema
      - `id` string, required
      - `name` string
      - `code` string, required — The discount code, must be unique and between 3 and 20 characters.
      - `amount` integer, required — A positive integer
      - `amountType` 'percent' | 'fixed', required
      - `active` boolean
      - `duration` 'number_of_payments', required
      - `numberOfPayments` integer, required — A positive integer
    - ForeverDiscountClientUpdateSchema
      - `id` string, required
      - `name` string
      - `code` string, required — The discount code, must be unique and between 3 and 20 characters.
      - `amount` integer, required — A positive integer
      - `amountType` 'percent' | 'fixed', required
      - `active` boolean
      - `duration` 'forever', required
      - `numberOfPayments` unknown

## Response `200`

Successful response

- object
  - `discount` union, required
    - ForeverDiscountClientSelectSchema
      - `id` string, required
      - `createdAt` integer, required — Epoch milliseconds.
      - `updatedAt` integer, required — Epoch milliseconds.
      - `livemode` boolean, required
      - `organizationId` string, required
      - `pricingModelId` string, required
      - `name` string, required
      - `code` string, required — The discount code, must be unique and between 3 and 20 characters.
      - `amount` integer, required — A positive integer
      - `amountType` 'percent' | 'fixed', required
      - `active` boolean, required
      - `duration` 'forever', required
      - `numberOfPayments` unknown
    - NumberOfPaymentsDiscountClientSelectSchema
      - `id` string, required
      - `createdAt` integer, required — Epoch milliseconds.
      - `updatedAt` integer, required — Epoch milliseconds.
      - `livemode` boolean, required
      - `organizationId` string, required
      - `pricingModelId` string, required
      - `name` string, required
      - `code` string, required — The discount code, must be unique and between 3 and 20 characters.
      - `amount` integer, required — A positive integer
      - `amountType` 'percent' | 'fixed', required
      - `active` boolean, required
      - `duration` 'number_of_payments', required
      - `numberOfPayments` integer, required — A positive integer
    - DefaultDiscountClientSelectSchema
      - `id` string, required
      - `createdAt` integer, required — Epoch milliseconds.
      - `updatedAt` integer, required — Epoch milliseconds.
      - `livemode` boolean, required
      - `organizationId` string, required
      - `pricingModelId` string, required
      - `name` string, required
      - `code` string, required — The discount code, must be unique and between 3 and 20 characters.
      - `amount` integer, required — A positive integer
      - `amountType` 'percent' | 'fixed', required
      - `active` boolean, required
      - `duration` 'once', required
      - `numberOfPayments` unknown

## Other responses

- `400` — Invalid input data
- `401` — Authorization not provided
- `403` — Insufficient access
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.dev/flowglad/apis/flowglad-api-2.md) · [All operations](https://skmtc.dev/flowglad/apis/flowglad-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flowglad/flowglad-api-2/revisions/c838c92c3606/schema)
