v8

OpenAPI 3.1.02026-08-033623795.0 MB
Promo codes

Update promo code

Update whether a promo code can be used at checkout.

Required permissions:

  • promo_code:update
  • access_pass:basic:read
patch/promo_codes/{id}

Path parameters

idstring required
Example:promo_xxxxxxxxxxxx

The unique identifier of the promo code to update.

Request body

status'active' | 'inactive' required

Statuses that can be applied to promo codes through update operations.

Response

A successful response

amount_offnumber required

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).

churned_users_onlyboolean required

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

codestring nullable required

The specific code used to apply the promo at checkout.

created_atstring date-time required

The datetime the promo code was created.

currency'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' required

The available currencies on the platform

duration'forever' | 'once' | 'repeating' required

The duration setting for the promo code

existing_memberships_onlyboolean required

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

expires_atstring date-time nullable required

The date/time of when the promo expires.

idstring required

The unique identifier for the promo code.

new_users_onlyboolean required

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

one_per_customerboolean required

Restricts promo use to only be applied once per customer.

promo_duration_monthsinteger nullable required

The number of months the promo is applied for.

promo_type'percentage' | 'flat_amount' required

The type of promo code used to discount a plan

status'active' | 'inactive' | 'archived' required

Statuses for promo codes

stockinteger required

The quantity limit on the number of uses.

unlimited_stockboolean required

Whether or not the promo code has unlimited stock.

usesinteger required

The amount of times the promo codes has been used.

Example response

{
  "amount_off": 6.9,
  "company": {
    "id": "biz_xxxxxxxxxxxxxx"
  },
  "created_at": "2023-12-01T05:00:00.401Z",
  "expires_at": "2023-12-01T05:00:00.401Z",
  "id": "promo_xxxxxxxxxxxx",
  "product": {
    "id": "prod_xxxxxxxxxxxxx",
    "title": "Pickaxe Analytics"
  },
  "promo_duration_months": 42,
  "stock": 42,
  "uses": 42
}