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

# exportVoucherCodes Mutation

DEPRECATED

Export functionality is deprecated and will be removed. All data can be fetched via the GraphQL API and parsed into the desired format by apps or external tools.

Export voucher codes to csv/xlsx file.

Added in Saleor 3.18.

Requires the MANAGE\_DISCOUNTS permission.

Triggers the following webhook events:

-   VOUCHER\_CODE\_EXPORT\_COMPLETED (async): A notification for the exported file.

```graphql
exportVoucherCodes(
  input: ExportVoucherCodesInput!
): ExportVoucherCodes @deprecated
```

Details

```graphql
type ExportVoucherCodes {
  exportFile: ExportFile
  errors: [ExportError!]!
}
```

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

### Arguments

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

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

Fields required to export voucher codes.

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

### Type

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

#### [`ExportVoucherCodes`](/api-reference/discounts/objects/export-voucher-codes.md)

Export voucher codes to csv/xlsx file.

Added in Saleor 3.18.

Requires the MANAGE\_DISCOUNTS permission.

Triggers the following webhook events:

-   VOUCHER\_CODE\_EXPORT\_COMPLETED (async): A notification for the exported file.
