v9

OpenAPI 3.1.02026-08-043703845.2 MB
Promo Codes

List Promo Codes

Lists promo codes for an account with cursor pagination, filters, and sorting.

get/promo_codes

Query parameters

account_idstring required

Account whose promo codes are listed (biz_ tag).

status'active' | 'inactive' | 'archived' | 'expired'

Promo-code status. expired groups inactive and archived codes.

product_idsstring[]

Only promo codes scoped to these product IDs.

plan_idsstring[]

Only promo codes scoped to these plan IDs.

created_beforestring date-time

Only promo codes created before this ISO 8601 timestamp.

created_afterstring date-time

Only promo codes created after this ISO 8601 timestamp.

order'created_at'

Sort field.

direction'asc' | 'desc'

Sort direction.

firstinteger

Number of promo codes to return from the start of the window.

afterstring

Cursor to paginate forwards from.

lastinteger

Number of promo codes to return from the end of the window.

beforestring

Cursor to paginate backwards from.

Response

promo codes listed

Example response

{
  "data": [
    {
      "currency": "usd",
      "duration": "forever",
      "promo_type": "percentage",
      "status": "active"
    }
  ]
}