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

## Changes

- **2026-01-18** `06c4dd78e137` — 3 info
  - added the required property `discount/anyOf[#/components/schemas/DefaultDiscountClientSelectSchema]/pricingModelId` to the response with the `200` status
  - added the required property `discount/anyOf[#/components/schemas/ForeverDiscountClientSelectSchema]/pricingModelId` to the response with the `200` status
  - added the required property `discount/anyOf[#/components/schemas/NumberOfPaymentsDiscountClientSelectSchema]/pricingModelId` to the response with the `200` status
- **2025-10-18** `a1eeb4fac4d6` — 1 breaking, 8 info
  - removed `subschema #1, subschema #2, subschema #3` from the `discount` request property `anyOf` list
  - added `#/components/schemas/DefaultDiscountClientUpdateSchema, #/components/schemas/NumberOfPaymentsDiscountClientUpdateSchema, #/components/schemas/ForeverDiscountClientUpdateSchema` to the `discount` request property `anyOf` list
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - …5 more
- **2025-06-25** `0cf7bce0c17d` — 1 breaking, 1 info
  - removed `subschema #1, subschema #2, subschema #3` from the `discount` request property `anyOf` list
  - added `subschema #1, subschema #2, subschema #3` to the `discount` request property `anyOf` list
- …earlier changes not shown

[Full history](https://skmtc.dev/flowglad/apis/flowglad-api/changes/api/v1/discounts/:id/put.md)

---

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