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

# VoucherInput Input Type

No description

```graphql
input VoucherInput {
  type: VoucherTypeEnum
  name: String
  code: String @deprecated
  addCodes: [String!]
  startDate: DateTime
  endDate: DateTime
  discountValueType: DiscountValueTypeEnum
  products: [ID!]
  variants: [ID!]
  collections: [ID!]
  categories: [ID!]
  minCheckoutItemsQuantity: Int
  countries: [String!]
  applyOncePerOrder: Boolean
  applyOncePerCustomer: Boolean
  onlyForStaff: Boolean
  singleUse: Boolean
  usageLimit: Int
}
```

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

### Fields

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

#### [`type`](#type) ● [`VoucherTypeEnum`](/api-reference/discounts/enums/voucher-type-enum.md)

Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE\_ORDER.

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

#### [`name`](#name) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Voucher name.

<a id="add-codes"></a>

#### [`addCodes`](#add-codes) ● [`[String!]`](/api-reference/miscellaneous/scalars/string.md)

List of codes to add.

Added in Saleor 3.18

This API is currently in **Feature Preview** and can be subject to changes at later point.

<a id="start-date"></a>

#### [`startDate`](#start-date) ● [`DateTime`](/api-reference/miscellaneous/scalars/date-time.md)

Start date of the voucher in ISO 8601 format.

<a id="end-date"></a>

#### [`endDate`](#end-date) ● [`DateTime`](/api-reference/miscellaneous/scalars/date-time.md)

End date of the voucher in ISO 8601 format.

<a id="discount-value-type"></a>

#### [`discountValueType`](#discount-value-type) ● [`DiscountValueTypeEnum`](/api-reference/discounts/enums/discount-value-type-enum.md)

Choices: fixed or percentage.

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

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

Products discounted by the voucher.

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

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

Variants discounted by the voucher.

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

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

Collections discounted by the voucher.

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

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

Categories discounted by the voucher.

<a id="min-checkout-items-quantity"></a>

#### [`minCheckoutItemsQuantity`](#min-checkout-items-quantity) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Minimal quantity of checkout items required to apply the voucher.

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

#### [`countries`](#countries) ● [`[String!]`](/api-reference/miscellaneous/scalars/string.md)

Country codes that can be used with the shipping voucher.

<a id="apply-once-per-order"></a>

#### [`applyOncePerOrder`](#apply-once-per-order) ● [`Boolean`](/api-reference/miscellaneous/scalars/boolean.md)

Voucher should be applied to the cheapest item or entire order.

<a id="apply-once-per-customer"></a>

#### [`applyOncePerCustomer`](#apply-once-per-customer) ● [`Boolean`](/api-reference/miscellaneous/scalars/boolean.md)

Voucher should be applied once per customer.

<a id="only-for-staff"></a>

#### [`onlyForStaff`](#only-for-staff) ● [`Boolean`](/api-reference/miscellaneous/scalars/boolean.md)

Voucher can be used only by staff user.

<a id="single-use"></a>

#### [`singleUse`](#single-use) ● [`Boolean`](/api-reference/miscellaneous/scalars/boolean.md)

When set to 'True', each voucher code can be used only once; otherwise, codes can be used multiple times depending on `usageLimit`.

The option can only be changed if none of the voucher codes have been used.

Added in Saleor 3.18

This API is currently in **Feature Preview** and can be subject to changes at later point.

<a id="usage-limit"></a>

#### [`usageLimit`](#usage-limit) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Limit number of times this voucher can be used in total.

Show deprecatedHide deprecated

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

#### [`code`](#code) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

DEPRECATED

Use `addCodes` instead.

Code to use the voucher.

<a id="member-of"></a>

### Member Of

[`voucherCreate`](/api-reference/discounts/mutations/voucher-create.md) mutation  ● [`voucherUpdate`](/api-reference/discounts/mutations/voucher-update.md) mutation
