---
title: "Update Discount Code"
method: PATCH
path: "/api/v1/discount-codes/{code_id}"
tags: ["Discount Codes"]
---

# Update Discount Code

`PATCH /api/v1/discount-codes/{code_id}`

## Request

- Base URL: `https://api.compteam.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.compteam.io/api/v1/discount-codes/{code_id}`
- Auth: HTTP bearer

## Path parameters

- `code_id` string, uuid, required

## Request body

- DiscountCodeUpdate
  - `code` string, nullable
  - `discount_type` 'fixed' | 'percentage', nullable
  - `discount_value` union
    - number
    - string
  - `membership_duration_months` integer, nullable
  - `membership_fee_coverage` 'recurring' | 'signup_fee' | 'both', nullable
  - `valid_from` string, nullable
  - `valid_until` string, nullable
  - `max_redemptions` integer, nullable
  - `is_active` boolean, nullable
  - `target_ids` string[], nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/compteam/apis/c-team-api.md) · [All operations](https://skmtc.dev/compteam/apis/c-team-api/llms.txt) · [OpenAPI document](https://skmtc.dev/compteam/apis/c-team-api/revisions/4bd27c892655?raw)
