UpdatePromotionDto
A model the API reference uses in a request or a response. The operation pages link every field typed as this model here.
Input for updating a promotion's editable fields.
Values
Fields
| Field | Type | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
merchantId
required |
string (uuid) | The merchant that owns this promotion. Required on create, and immutable afterwards: an update
that names a different merchant is refused rather than silently moving the promotion and the
ledger entries that point at it.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
code
required |
string | The code a payer types. Stored trimmed and upper-cased, and unique among the merchant's
promotions, so `save10` and `SAVE10` are the same code rather than two.
Conditional: When Code is not empty.
nullablemax length 64
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
name
required |
string | Operator-facing promotion name. Never shown to payers.
nullablemax length 128
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
description
required |
string | Free-text description of the promotion.
nullablemax length 1024
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
discountType
required |
PromotionDiscountType PromotionDiscountType | Whether the value is a percentage or a flat amount.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
value
required |
number (double) | The percentage, or the flat amount in `currency`.
Conditional: When DiscountType == Percent. Must be <= 100.
Conditional: When DiscountType == Flat. Must be <= 1000000.
greater than 0
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
currency
required |
string | The ISO 4217 currency. Required for a flat amount, and optional for a percentage, where it
narrows the promotion to one currency rather than denominating anything.
Required: When DiscountType == Flat.
Conditional: When Currency is not empty. Length: 3 to 3.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
startsAtUtc
required |
string (date-time) | UTC moment the promotion starts being accepted. `null` starts it immediately.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
endsAtUtc
required |
string (date-time) | UTC moment the promotion stops being accepted. `null` leaves it open.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
maxRedemptions
required |
integer (int32) | How many times the promotion may be redeemed in total. `null` for no ceiling.
Conditional: When MaxRedemptions is not null. Must be > 0.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
maxRedemptionsPerCustomer
required |
integer (int32) | How many times one customer may redeem it. `null` for no ceiling. A promotion that
carries one refuses a redemption that identifies no customer.
Conditional: When MaxRedemptionsPerCustomer is not null. Must be > 0.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
minimumSubtotal
required |
number (double) | The smallest amount the promotion applies to. `null` for no floor.
Conditional: When MinimumSubtotal is not null. Must be >= 0.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
appliesToScope
required |
PromotionAppliesToScope PromotionAppliesToScope | What the promotion may be applied to.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
appliesToTargetIds
required |
array of string (uuid) array of | The pages, products or plans the scope names. Required by every scope except
`Any`, which ignores it.
Conditional: When AppliesToScope != Any.
Conditional: When AppliesToTargetIds is not null.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
durationMode
required |
PromotionDurationMode PromotionDurationMode | How long the discount runs on a recurring charge.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
durationCycles
required |
integer (int32) | How many billing cycles the discount runs for. Required by
`Cycles`, and ignored by every other mode.
Required: When DurationMode == Cycles.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
isActive
required |
boolean | Whether the promotion is accepted. A deactivated promotion keeps its ledger.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||
concurrencyStamp
required |
string |
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
|
This model has no documented fields.