> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/discounts/llms.txt)
> Source: https://docs.saleor.io/api-reference/discounts/mutations/voucher-update

# voucherUpdate Mutation

Updates a voucher.

Requires the MANAGE\_DISCOUNTS permission.

Triggers the following webhook events:

-   VOUCHER\_UPDATED (async): A voucher was updated.
-   VOUCHER\_CODES\_CREATED (async): A voucher code was created.

```graphql
voucherUpdate(
  id: ID!
  input: VoucherInput!
): VoucherUpdate
```

Details

```graphql
type VoucherUpdate {
  discountErrors: [DiscountError!]! @deprecated
  errors: [DiscountError!]!
  voucher: Voucher
}
```

<a id="arguments"></a>

### Arguments

<a id="id"></a>

#### [`id`](#id) ● [`ID!`](/api-reference/miscellaneous/scalars/id.md)

ID of a voucher to update.

<a id="input"></a>

#### [`input`](#input) ● [`VoucherInput!`](/api-reference/discounts/inputs/voucher-input.md)

Fields required to update a voucher.

<a id="type"></a>

### Type

<a id="voucherupdate"></a>

#### [`VoucherUpdate`](/api-reference/discounts/objects/voucher-update.md)

Updates a voucher.

Requires the MANAGE\_DISCOUNTS permission.

Triggers the following webhook events:

-   VOUCHER\_UPDATED (async): A voucher was updated.
-   VOUCHER\_CODES\_CREATED (async): A voucher code was created.
