Skip to main content
PATCH
Update promo code
Required permissions:
  • promo_code:update
  • access_pass:basic:read

Autorisationer

Authorization
string
header
påkrævet

An Account API key, account-scoped JWT, App API key, or user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************.

Scopes

promo_code:update
access_pass:basic:read

Sti-parametre

id
string
påkrævet

The unique identifier of the promo code to update.

Eksempel:

"promo_xxxxxxxxxxxx"

Krop

application/json

Parameters for UpdatePromoCode

status
enum<string>
påkrævet

The status to apply to the promo code.

Tilgængelige muligheder:
active,
inactive

Svar

A successful response

A promo code applies a discount to a plan during checkout. Promo codes can be percentage-based or fixed-amount, and can have usage limits and expiration dates.

amount_off
number
påkrævet

The discount amount. Interpretation depends on promo_type: if 'percentage', this is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars off (e.g., 10.00 means $10.00 off).

Eksempel:

6.9

churned_users_only
boolean
påkrævet

Restricts promo use to only users who have churned from the company before.

code
string | null
påkrævet

The specific code used to apply the promo at checkout.

company
object
påkrævet

The company for the promo code.

created_at
string<date-time>
påkrævet

The datetime the promo code was created.

Eksempel:

"2023-12-01T05:00:00.401Z"

currency
enum<string>
påkrævet

The monetary currency of the promo code.

Tilgængelige muligheder:
usd,
sgd,
inr,
aud,
brl,
cad,
dkk,
eur,
nok,
gbp,
sek,
chf,
hkd,
huf,
jpy,
mxn,
myr,
pln,
czk,
nzd,
aed,
eth,
ape,
cop,
ron,
thb,
bgn,
idr,
dop,
php,
try,
krw,
twd,
vnd,
pkr,
clp,
uyu,
ars,
zar,
dzd,
tnd,
mad,
kes,
kwd,
jod,
all,
xcd,
amd,
bsd,
bhd,
bob,
bam,
khr,
crc,
xof,
egp,
etb,
gmd,
ghs,
gtq,
gyd,
ils,
jmd,
mop,
mga,
mur,
mdl,
mnt,
nad,
ngn,
mkd,
omr,
pyg,
pen,
qar,
rwf,
sar,
rsd,
lkr,
tzs,
ttd,
uzs,
rub,
btc,
cny,
usdt,
kzt,
awg,
whop_usd,
xau,
hnl
duration
enum<string> | null
påkrævet

The duration of the promo.

Tilgængelige muligheder:
forever,
once,
repeating
existing_memberships_only
boolean
påkrævet

Restricts promo use to only be applied to already purchased memberships.

expires_at
string<date-time> | null
påkrævet

The date/time of when the promo expires.

Eksempel:

"2023-12-01T05:00:00.401Z"

id
string
påkrævet

The unique identifier for the promo code.

Eksempel:

"promo_xxxxxxxxxxxx"

new_users_only
boolean
påkrævet

Restricts promo use to only users who have never purchased from the company before.

one_per_customer
boolean
påkrævet

Restricts promo use to only be applied once per customer.

product
object | null
påkrævet

The product this promo code applies to

promo_duration_months
integer | null
påkrævet

The number of months the promo is applied for.

Eksempel:

42

promo_type
enum<string>
påkrævet

The type (% or flat amount) of the promo.

Tilgængelige muligheder:
percentage,
flat_amount
status
enum<string>
påkrævet

Indicates if the promo code is live or disabled.

Tilgængelige muligheder:
active,
inactive,
archived
stock
integer
påkrævet

The quantity limit on the number of uses.

Eksempel:

42

unlimited_stock
boolean
påkrævet

Whether or not the promo code has unlimited stock.

uses
integer
påkrævet

The amount of times the promo codes has been used.

Eksempel:

42