Skip to main content

CreatePromoCodeRequest

@gravity-rail/sdk


@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?​

optional bonusCredits: number

Minimum​

0

Maximum​

10000000


campaign?​

optional campaign: string | null


code​

code: string

Min Length​

1

Max Length​

64


description?​

optional description: string | null


expiresAfterDays​

expiresAfterDays: number

Maximum​

3650

Exclusive Minimum​

0


isActive?​

optional isActive: boolean


maxRedemptions?​

optional maxRedemptions: number | null


orgProductId?​

optional orgProductId: number | null

Self-service Organization product granted for one month by direct billing; may be combined with bonus credits.


validFrom?​

optional validFrom: string | null


validUntil?​

optional validUntil: string | null