Skip to main content
POST
cURL
Create a distribution code for an existing Offer with one or more sequential discount phases and an optional leading trial. The code owns redemption restrictions.

Autorizaciones

x-api-key
string
header
requerido

Encabezados

Idempotency-Key
string

Unique key used to safely retry this write for 24 hours without applying it twice.

Required string length: 1 - 200
Commet-Version
string
predeterminado:2026-08-27

API version used by this reference. Send this header to select this contract explicitly.

Cuerpo

application/json
code
string
requerido
Minimum string length: 1
offerId
string
requerido
Minimum string length: 1
billingInterval
enum<string> | null
Opciones disponibles:
weekly,
monthly,
quarterly,
yearly,
one_time
maxRedemptions
integer
Rango requerido: x <= 9007199254740991
expiresAt
string<date-time>
planIds
string[]

Respuesta

Success

id
string
requerido
code
string
requerido
offerId
string
requerido
billingInterval
enum<string> | null
requerido
Opciones disponibles:
weekly,
monthly,
quarterly,
yearly,
one_time
maxRedemptions
integer | null
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
expiresAt
string<date-time> | null
requerido
isActive
boolean
requerido
redemptionCount
integer
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
createdAt
string<date-time>
requerido
updatedAt
string<date-time>
requerido
object
string
requerido
Allowed value: "promo_code"
livemode
boolean
requerido