Skip to main content

VoucherInput Input Type

No description

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
}

Fields​

type ● VoucherTypeEnum​

Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER.

name ● String​

Voucher name.

addCodes ● [String!]​

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.

startDate ● DateTime​

Start date of the voucher in ISO 8601 format.

endDate ● DateTime​

End date of the voucher in ISO 8601 format.

discountValueType ● DiscountValueTypeEnum​

Choices: fixed or percentage.

products ● [ID!]​

Products discounted by the voucher.

variants ● [ID!]​

Variants discounted by the voucher.

collections ● [ID!]​

Collections discounted by the voucher.

categories ● [ID!]​

Categories discounted by the voucher.

minCheckoutItemsQuantity ● Int​

Minimal quantity of checkout items required to apply the voucher.

countries ● [String!]​

Country codes that can be used with the shipping voucher.

applyOncePerOrder ● Boolean​

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

applyOncePerCustomer ● Boolean​

Voucher should be applied once per customer.

onlyForStaff ● Boolean​

Voucher can be used only by staff user.

singleUse ● Boolean​

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.

usageLimit ● Int​

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

Show deprecatedHide deprecated

code ● String​

DEPRECATED

Use addCodes instead.

Code to use the voucher.

Member Of​

voucherCreate mutation ● voucherUpdate mutation