---
title: "Switch a promo code on or off, or change its limit, end or offering; null opens each again. Bookings made with it keep what it took off"
method: PATCH
path: "/promo_codes/{id}"
tags: ["promo_codes"]
---

# Switch a promo code on or off, or change its limit, end or offering; null opens each again. Bookings made with it keep what it took off

`PATCH /promo_codes/{id}`

## Request

- Base URL: `https://daybag.io/api/v1`
- URL: `https://daybag.io/api/v1/promo_codes/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `active` boolean: false switches it off: guests can't use it
  - `max_uses` integer, nullable: How many bookings may use it; null (or left out) for no limit
  - `ends_at` string, nullable: ISO 8601 instant, e.g. 2026-10-03T15:00:00Z
  - `offering_id` string, uuid, nullable: Only this offering's bookings; null (or left out) for any offering

## Response `200`

Success

- object
  - `id` string, required
  - `org_id` string, required
  - `code` string, required: As guests give it, upper-cased: 3 to 20 letters, digits and dashes
  - `percent_off` integer, nullable, required: Percent off a booking's total, 1 to 100; null when it takes an amount off
  - `amount_off` integer, nullable, required: Off a booking's total, in the currency's minor units (cents; whole yen for zero-decimal currencies), never below zero; null when it takes a percent off
  - `offering_id` string, nullable, required: The one offering it's for; null for any offering
  - `max_uses` integer, nullable, required: How many bookings may use it; null for no limit
  - `uses` integer, required: Bookings made with it
  - `starts_at` string, nullable, required: ISO 8601 timestamp (UTC)
  - `ends_at` string, nullable, required: ISO 8601 timestamp (UTC)
  - `active` boolean, required: false: switched off, it can't be used
  - `created_at` string, required: ISO 8601 timestamp (UTC)

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/daybag/apis/daybooked-io-api.md) · [All operations](https://skmtc.dev/daybag/apis/daybooked-io-api/llms.txt) · [OpenAPI document](https://skmtc.dev/daybag/apis/daybooked-io-api/revisions/1f576dead370?raw)
