---
title: "Rename, pause or change the rule. A rule change creates a new version; earlier uses keep theirs"
method: PATCH
path: "/api/v1/coupons/{id}"
---

# Rename, pause or change the rule. A rule change creates a new version; earlier uses keep theirs

`PATCH /api/v1/coupons/{id}`

## Request

- Base URL: `http://127.0.0.1:4310`
- URL: `http://127.0.0.1:4310/api/v1/coupons/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `sfb_session`

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `active` boolean
  - `expected_version` integer
  - `discount_type` 'percent' | 'fixed'
  - `percent` integer
  - `amount_minor` integer
  - `scope` 'all' | 'services' | 'categories' | 'products': Gift cards are excluded unless include_gift_cards is true
  - `service_ids` string[]
  - `categories` string[]
  - `product_ids` string[]
  - `include_gift_cards` boolean
  - `min_spend_minor` integer
  - `starts_at` string, date-time
  - `ends_at` string, date-time
  - `total_cap` integer
  - `per_client_cap` integer
  - `first_visit_only` boolean
  - `stackable` boolean

## Response `200`

OK

- object

## Other responses

- `400`: Validation error
- `401`: Unauthenticated
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict or invalid state

---

[API](https://skmtc.dev/scalingfirm/apis/tsf-booking-api.md) · [All operations](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/revisions/81704199cd37?raw)
