# 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.

## Fields
- `merchantId` (string(uuid)) required: 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)
- `code` (string) required: 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. (nullable, max length 64)
- `name` (string) required: Operator-facing promotion name. Never shown to payers. (nullable, max length 128)
- `description` (string): Free-text description of the promotion. (nullable, max length 1024)
- `discountType` ([PromotionDiscountType](https://devportal.demo.winkpg.io/docs/api/models/PromotionDiscountType.md)): Whether the value is a percentage or a flat amount.
  Values:
  - `Percent`: A percentage of the amount, for example 10 meaning 10%.
  - `Flat`: A flat amount in the promotion's currency, for example 5 meaning 5.00.
- `value` (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)
- `currency` (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)
- `startsAtUtc` (string(date-time)): UTC moment the promotion starts being accepted. `null` starts it immediately. (nullable)
- `endsAtUtc` (string(date-time)): UTC moment the promotion stops being accepted. `null` leaves it open. (nullable)
- `maxRedemptions` (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)
- `maxRedemptionsPerCustomer` (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)
- `minimumSubtotal` (number(double)): The smallest amount the promotion applies to. `null` for no floor. Conditional: When MinimumSubtotal is not null. Must be >= 0. (nullable)
- `appliesToScope` ([PromotionAppliesToScope](https://devportal.demo.winkpg.io/docs/api/models/PromotionAppliesToScope.md)): What the promotion may be applied to.
  Values:
  - `Any`: Anything the merchant charges for. No target list is consulted.
  - `HostedPages`: Only the named hosted payment pages.
  - `Products`: Only the named products.
  - `Plans`: Only the named contract plans.
- `appliesToTargetIds` (array<string(uuid)>): 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)
- `durationMode` ([PromotionDurationMode](https://devportal.demo.winkpg.io/docs/api/models/PromotionDurationMode.md)): How long the discount runs on a recurring charge.
  Values:
  - `FirstBillOnly`: Discount only the first bill.
  - `Cycles`: Discount a fixed number of billing cycles.
  - `UntilRemoved`: Discount every bill until someone takes the promotion off the subscription.
- `durationCycles` (integer(int32)): How many billing cycles the discount runs for. Required by  `Cycles`, and ignored by every other mode. Required: When DurationMode == Cycles. (nullable)
- `isActive` (boolean): Whether the promotion is accepted. A deactivated promotion keeps its ledger.
- `concurrencyStamp` (string): (nullable)

## See also

- [All documentation](https://devportal.demo.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
