Skip to main content

UpdatePromoCodeRequest

@gravity-rail/sdk


@gravity-rail/sdk / UpdatePromoCodeRequest

Interface: UpdatePromoCodeRequest

Patch an existing campaign code.

Every field is optional and model_fields_set decides what to write, so omitting maxRedemptions leaves the cap untouched while sending null lifts it. A model that could not tell those apart would silently uncap a campaign on any partial edit.

code is accepted but the service refuses it once the campaign has redemptions — renaming a code that is already in adverts and already attributed would break the attribution the code exists to provide.

Properties​

bonusCredits?​

optional bonusCredits: number | null


campaign?​

optional campaign: string | null


code?​

optional code: string | null


description?​

optional description: string | null


expiresAfterDays?​

optional expiresAfterDays: number | null


isActive?​

optional isActive: boolean | null


maxRedemptions?​

optional maxRedemptions: number | null


orgProductId?​

optional orgProductId: number | null

Self-service Organization product granted for one month by direct billing; null clears the plan benefit.


validFrom?​

optional validFrom: string | null


validUntil?​

optional validUntil: string | null