Skip to main content

voucherCreate Mutation

Creates a new voucher.

Requires the MANAGE_DISCOUNTSpermission.

Triggers the following webhook events:

  • VOUCHER_CREATED (async): A voucher was created.
  • VOUCHER_CODES_CREATED (async): A voucher codes were created.
voucherCreate(
input: VoucherInput!
): VoucherCreate
Details
type VoucherCreate {
discountErrors: [DiscountError!]! @deprecated
errors: [DiscountError!]!
voucher: Voucher
}

Arguments

input ● VoucherInput!

Fields required to create a voucher.

Type

VoucherCreate

Creates a new voucher.

Requires the MANAGE_DISCOUNTSpermission.

Triggers the following webhook events:

  • VOUCHER_CREATED (async): A voucher was created.
  • VOUCHER_CODES_CREATED (async): A voucher codes were created.