voucherUpdate Mutation
Updates a voucher.
Triggers the following webhook events:
- VOUCHER_UPDATED (async): A voucher was updated.
- VOUCHER_CODES_CREATED (async): A voucher code was created.
Applied directives
@webhookEventsInfo(asyncEvents: [VOUCHER_UPDATED, VOUCHER_CODES_CREATED], syncEvents: [])
voucherUpdate(externalReference: String, id: ID, input: VoucherInput!): VoucherUpdate
Returns
Show return type
type VoucherUpdate {
discountErrors: [DiscountError!]! @deprecated(reason: "Use `errors` field instead.")
errors: [DiscountError!]!
voucher: Voucher
}Arguments
externalReference
externalReference · String
External ID of a voucher to update.
Added in Saleor 3.23id
id · ID
ID of a voucher to update.
input
input · VoucherInput!
Fields required to update a voucher.
Schema: Saleor 3.23.43. Download SDL.