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