Admin API / Mutations
updateDiscountCode
Changes the given fields of a discount code that the caller reads (Query.discountCode). An omitted field keeps its value. The code text, the reward and the deactivated state do not change. A change to eligibility, oncePerBuyer or minimumSubtotal stores all three again, so checkout applies the terms that DiscountCode shows. A repeat with the same input sets the same values. After a sent expiresAt passes, a repeat of that input fails with VALIDATION_ERROR.
Requires a client key with one of these scopes:
admin:discounts:writeRequires this member role or higher: SELLERupdateDiscountCode(
input: UpdateDiscountCodeInput!
): UpdateDiscountCodePayload!Arguments
| Argument | Type | Description |
|---|---|---|
input | UpdateDiscountCodeInput! | The code and its changes. |