Skip to main content
PATCH
Update coupon

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

couponPublicId
string<uuid>
obrigatório

Corpo

application/json

Body for updating an existing coupon. Coupons are largely immutable post-creation; only name, active, maxUses and validUntil can change.

active
boolean

Activate or deactivate the coupon. Synced with the Stripe promotion code.

Exemplo:

true

maxUses
integer<int32>

New maximum total redemptions. Must be >= current redemption count.

Intervalo necessário: x >= 1
Exemplo:

200

name
string

New internal display name for the coupon.

Maximum string length: 100
Exemplo:

"Welcome 10% off"

validUntil
string<date-time>

New end of the validity window.

Exemplo:

"2026-12-31T23:59:59Z"

Resposta

OK

active
boolean
applicablePlans
object[]
code
string
createdAt
string<date-time>
currency
string
discountType
enum<string>
Opções disponíveis:
percentage,
fixed_amount
discountValue
integer<int32>
duration
enum<string>
Opções disponíveis:
once,
repeating,
forever
durationMonths
integer<int32>
isExhausted
boolean
isExpired
boolean
maxUses
integer<int32>
name
string
publicId
string<uuid>
scope
enum<string>
Opções disponíveis:
hub,
plans
stripeCouponId
string
stripePromotionCodeId
string
timesUsed
integer<int32>
updatedAt
string<date-time>
validFrom
string<date-time>
validUntil
string<date-time>