VoucherInput
No description
input VoucherInput {
type: VoucherTypeEnum
name: String
code: String
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
VoucherInput.type
● VoucherTypeEnum
enum
Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER.
VoucherInput.name
● String
scalar
Voucher name.
VoucherInput.code
● String
scalar
Code to use the voucher. This field will be removed in Saleor 4.0. Use
addCodes
instead.
VoucherInput.addCodes
● [String!]
list scalar
List of codes to add.
Added in Saleor 3.18This API is currently in Feature Preview and can be subject to changes at later point.
VoucherInput.startDate
● DateTime
scalar
Start date of the voucher in ISO 8601 format.
VoucherInput.endDate
● DateTime
scalar
End date of the voucher in ISO 8601 format.
VoucherInput.discountValueType
● DiscountValueTypeEnum
enum
Choices: fixed or percentage.
VoucherInput.products
● [ID!]
list scalar
Products discounted by the voucher.
VoucherInput.variants
● [ID!]
list scalar
Variants discounted by the voucher.
Added in Saleor 3.1
VoucherInput.collections
● [ID!]
list scalar
Collections discounted by the voucher.
VoucherInput.categories
● [ID!]
list scalar
Categories discounted by the voucher.
VoucherInput.minCheckoutItemsQuantity
● Int
scalar
Minimal quantity of checkout items required to apply the voucher.
VoucherInput.countries
● [String!]
list scalar
Country codes that can be used with the shipping voucher.
VoucherInput.applyOncePerOrder
● Boolean
scalar
Voucher should be applied to the cheapest item or entire order.
VoucherInput.applyOncePerCustomer
● Boolean
scalar
Voucher should be applied once per customer.
VoucherInput.onlyForStaff
● Boolean
scalar
Voucher can be used only by staff user.
VoucherInput.singleUse
● Boolean
scalar
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.18This API is currently in Feature Preview and can be subject to changes at later point.
VoucherInput.usageLimit
● Int
scalar
Limit number of times this voucher can be used in total.
Member of
voucherCreate
mutation ● voucherUpdate
mutation