CreatePromoCodeRequest
@gravity-rail/sdk / CreatePromoCodeRequest
Interface: CreatePromoCodeRequest
Mint a new campaign code.
Bounds are duplicated here and as CHECK constraints on the table. That is intentional: the constraints are the real guarantee (they also bind the redemption path and any future writer), and these validators exist so an operator supplying neither credits nor a plan gets a field-level 400 instead of a 409 from a constraint violation.
Properties
bonusCredits?
optionalbonusCredits:number
Minimum
0
Maximum
10000000
campaign?
optionalcampaign:string|null
code
code:
string
Min Length
1
Max Length
64
description?
optionaldescription:string|null
expiresAfterDays
expiresAfterDays:
number
Maximum
3650
Exclusive Minimum
0
isActive?
optionalisActive:boolean
maxRedemptions?
optionalmaxRedemptions:number|null
orgProductId?
optionalorgProductId:number|null
Self-service Organization product granted for one month by direct billing; may be combined with bonus credits.
validFrom?
optionalvalidFrom:string|null
validUntil?
optionalvalidUntil:string|null