voucherCreate Mutation
Creates a new voucher.
Triggers the following webhook events:
- VOUCHER_CREATED (async): A voucher was created.
- VOUCHER_CODES_CREATED (async): A voucher codes were created.
Applied directives
@webhookEventsInfo(asyncEvents: [VOUCHER_CREATED, VOUCHER_CODES_CREATED], syncEvents: [])
voucherCreate(input: VoucherInput!): VoucherCreate
Returns
Show return type
type VoucherCreate {
discountErrors: [DiscountError!]! @deprecated(reason: "Use `errors` field instead.")
errors: [DiscountError!]!
voucher: Voucher
}Arguments
input
input · VoucherInput!
Fields required to create a voucher.
Schema: Saleor 3.23.43. Download SDL.