Voucher
Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes.
type Voucher implements Node, ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(key: String!): String
privateMetafields(keys: [String!]): Metadata
metadata: [MetadataItem!]!
metafield(key: String!): String
metafields(keys: [String!]): Metadata
name: String
codes(
before: String
after: String
first: Int
last: Int
): VoucherCodeCountableConnection
code: String
usageLimit: Int
used: Int!
startDate: DateTime!
endDate: DateTime
applyOncePerOrder: Boolean!
applyOncePerCustomer: Boolean!
singleUse: Boolean!
onlyForStaff: Boolean!
minCheckoutItemsQuantity: Int
categories(
before: String
after: String
first: Int
last: Int
): CategoryCountableConnection
collections(
before: String
after: String
first: Int
last: Int
): CollectionCountableConnection
products(
before: String
after: String
first: Int
last: Int
): ProductCountableConnection
variants(
before: String
after: String
first: Int
last: Int
): ProductVariantCountableConnection
countries: [CountryDisplay!]
translation(languageCode: LanguageCodeEnum!): VoucherTranslation
discountValueType: DiscountValueTypeEnum!
discountValue: Float
currency: String
minSpent: Money
type: VoucherTypeEnum!
channelListings: [VoucherChannelListing!]
}
Expand ▼