discount Code Activate
Requires Apps must have access scope.
Activates a previously created code discount, making it available for customers to use during checkout. This mutation transitions inactive discount codes into an active state where they can be applied to orders.
For example, after creating a "SUMMER20" discount code but leaving it inactive during setup, merchants can activate it when ready to launch their summer promotion campaign.
Use to:
- Launch scheduled promotional campaigns
- Reactivate previously paused discount codes
- Enable discount codes after configuration changes
- Control the timing of discount availability
The mutation returns the updated discount code node with its new active status and handles any validation errors that might prevent activation, such as conflicting discount rules or invalid date ranges.
Arguments
- •ID!required
The ID of the code discount to activate.
- Anchor to codeDiscountNodecode•Discount
Discount Node Code Node The activated code discount.
- Anchor to userErrorsuser•[Discount
Errors User Error!]! non-null The list of errors that occurred from executing the mutation.