Admin API / Types
UpdateDiscountCodeInput
InputThe discount code to change and its new values.
input UpdateDiscountCodeInputInput fields
| Field | Type | Description |
|---|---|---|
discountCodeId | ID! | The ID of a discount code that the caller reads (Query.discountCode). |
eligibility | DiscountEligibility | The buyers who can use the code. Omitted: no change. Null fails with VALIDATION_ERROR. |
expiresAt | DateTime | When the code stops working. A time that is not in the future fails with VALIDATION_ERROR. Null: the code does not expire. Omitted: no change. |
minimumSubtotal | MoneyInput | The lowest order subtotal, in the store currency, with at most 2 decimal places and 15 digits. Null or 0: no minimum. Omitted: no change. Another currency gives CurrencyMismatchError. |
oncePerBuyer | Boolean | True when each buyer can use the code one time only. Omitted: no change. Null fails with VALIDATION_ERROR. |
usageLimit | PositiveInt | The number of uses allowed, at most 2,147,483,647. Null: no limit. Omitted: no change. A limit at or below usageCount makes status USAGE_LIMIT_REACHED. |