Admin API / Types

UpdateDiscountCodeInput

Input

The discount code to change and its new values.

input UpdateDiscountCodeInput

Input fields

FieldTypeDescription
discountCodeIdID!The ID of a discount code that the caller reads (Query.discountCode).
eligibilityDiscountEligibilityThe buyers who can use the code. Omitted: no change. Null fails with VALIDATION_ERROR.
expiresAtDateTimeWhen 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.
minimumSubtotalMoneyInputThe 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.
oncePerBuyerBooleanTrue when each buyer can use the code one time only. Omitted: no change. Null fails with VALIDATION_ERROR.
usageLimitPositiveIntThe 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.