setDiscountStatus
Activates or deactivates a discount.
DiscountStatus.INACTIVE stops the code from being accepted at checkout while keeping the discount, its
constraints and its Discount.numberOfRedemptions in the company's list. DiscountStatus.ACTIVE makes
it redeemable again. Setting the status a discount already has changes nothing.
Deactivating releases the code string, so another discount can be created with the same code in the
meantime. Reactivating then fails, because a company cannot have two active discounts with the same
code. Read Discount.canBeActivated first: it is true only for an inactive discount whose code is
still free.
The updated discount is resolved as SetDiscountStatusPayload.discount. An ID that does not exist
responds with a not-found error.
Authorization is required: you must be allowed to manage the discounts of the company that owns the discount.
Arguments
| Argument | Description | Type |
|---|---|---|
| input | SetDiscountStatusInput! |
Type
This field resolves to SetDiscountStatusPayload!.