Skip to main content

VoucherInput

Input for creating or updating a voucher.

input VoucherInput {
type: VoucherTypeEnum
name: String
code: String
startDate: DateTime
endDate: DateTime
discountValueType: DiscountValueTypeEnum
discountValue: PositiveDecimal
products: [ID!]
variants: [ID!]
collections: [ID!]
categories: [ID!]
minAmountSpent: PositiveDecimal
minCheckoutItemsQuantity: Int
countries: [String!]
applyOncePerOrder: Boolean
applyOncePerCustomer: Boolean
usageLimit: Int
}
Show more ↓

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. If empty, a code will be generated.

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

Discount type: fixed or percentage.

VoucherInput.discountValue ● PositiveDecimal scalar

Value of the voucher discount.

VoucherInput.products ● [ID!] list scalar

Products discounted by the voucher.

VoucherInput.variants ● [ID!] list scalar

Variants discounted by the voucher.

VoucherInput.collections ● [ID!] list scalar

Collections discounted by the voucher.

VoucherInput.categories ● [ID!] list scalar

Categories discounted by the voucher.

VoucherInput.minAmountSpent ● PositiveDecimal scalar

Minimum purchase amount required to apply the voucher.

VoucherInput.minCheckoutItemsQuantity ● Int scalar

Minimum 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.usageLimit ● Int scalar

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

Member Of

voucherCreate mutation ● voucherUpdate mutation

Was this page helpful?