Skip to main content

Interface: CreatePromoCodeRequest

Defined in: packages/sdk/src/types/generated/promo_code.ts:45

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

Defined in: packages/sdk/src/types/generated/promo_code.ts:57

Minimum

0

Maximum

10000000


campaign?

optional campaign: string | null

Defined in: packages/sdk/src/types/generated/promo_code.ts:52


code

code: string

Defined in: packages/sdk/src/types/generated/promo_code.ts:50

Min Length

1

Max Length

64


description?

optional description: string | null

Defined in: packages/sdk/src/types/generated/promo_code.ts:51


expiresAfterDays

expiresAfterDays: number

Defined in: packages/sdk/src/types/generated/promo_code.ts:64

Maximum

3650

Exclusive Minimum

0


isActive?

optional isActive: boolean

Defined in: packages/sdk/src/types/generated/promo_code.ts:66


maxRedemptions?

optional maxRedemptions: number | null

Defined in: packages/sdk/src/types/generated/promo_code.ts:65


orgProductId?

optional orgProductId: number | null

Defined in: packages/sdk/src/types/generated/promo_code.ts:59

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


validFrom?

optional validFrom: string | null

Defined in: packages/sdk/src/types/generated/promo_code.ts:67


validUntil?

optional validUntil: string | null

Defined in: packages/sdk/src/types/generated/promo_code.ts:68