Skip to main content

Voucher

Represents a voucher (promotional code) for discounts.

type Voucher implements Node {
id: ID!
name: String
code: String!
usageLimit: Int
used: Int!
currency: String!
applyOncePerOrder: Boolean!
applyOncePerCustomer: Boolean!
minCheckoutItemsQuantity: Int
type: VoucherTypeEnum!
discountValueType: DiscountValueTypeEnum!
discountValue: Float!
startDate: DateTime!
endDate: DateTime
minSpent: Money
countries: [CountryDisplay!]!
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!
}
Show more ↓

Fields

Voucher.id ● ID! non-null scalar

The Globally Unique ID of this object

Voucher.name ● String scalar

Name of the voucher

Voucher.code ● String! non-null scalar

Voucher code

Voucher.usageLimit ● Int scalar

Maximum usage limit

Voucher.used ● Int! non-null scalar

Number of times used

Voucher.currency ● String! non-null scalar

Currency code

Voucher.applyOncePerOrder ● Boolean! non-null scalar

Whether to apply once per order

Voucher.applyOncePerCustomer ● Boolean! non-null scalar

Whether to apply once per customer

Voucher.minCheckoutItemsQuantity ● Int scalar

Minimum checkout items quantity required

Voucher.type ● VoucherTypeEnum! non-null enum

Determines a type of voucher.

Voucher.discountValueType ● DiscountValueTypeEnum! non-null enum

Determines a type of discount for voucher - value or percentage

Voucher.discountValue ● Float! non-null scalar

Discount value amount

Voucher.startDate ● DateTime! non-null scalar

Start date

Voucher.endDate ● DateTime scalar

End date

Voucher.minSpent ● Money object

Minimum amount spent required

Voucher.countries ● [CountryDisplay!]! non-null object

List of countries this voucher applies to.

Voucher.categories ● CategoryCountableConnection! non-null object

List of categories this voucher applies to.

Voucher.categories.before ● String scalar

Returns the items in the list that come before the specified cursor.

Voucher.categories.after ● String scalar

Returns the items in the list that come after the specified cursor.

Voucher.categories.first ● Int scalar

Returns the first n items from the list.

Voucher.categories.last ● Int scalar

Returns the items in the list that come after the specified cursor.

Voucher.collections ● CollectionCountableConnection! non-null object

List of collections this voucher applies to.

Voucher.collections.before ● String scalar

Returns the items in the list that come before the specified cursor.

Voucher.collections.after ● String scalar

Returns the items in the list that come after the specified cursor.

Voucher.collections.first ● Int scalar

Returns the first n items from the list.

Voucher.collections.last ● Int scalar

Returns the items in the list that come after the specified cursor.

Voucher.products ● ProductCountableConnection! non-null object

List of products this voucher applies to.

Voucher.products.before ● String scalar

Returns the items in the list that come before the specified cursor.

Voucher.products.after ● String scalar

Returns the items in the list that come after the specified cursor.

Voucher.products.first ● Int scalar

Returns the first n items from the list.

Voucher.products.last ● Int scalar

Returns the items in the list that come after the specified cursor.

Voucher.variants ● ProductVariantCountableConnection! non-null object

List of variants this voucher applies to.

Voucher.variants.before ● String scalar

Returns the items in the list that come before the specified cursor.

Voucher.variants.after ● String scalar

Returns the items in the list that come after the specified cursor.

Voucher.variants.first ● Int scalar

Returns the first n items from the list.

Voucher.variants.last ● Int scalar

Returns the items in the list that come after the specified cursor.

Interfaces

Node interface

An object with a Globally Unique ID

Returned By

voucher query

Member Of

Collection object ● NauticalOrder object ● Order object ● Product object ● ProductVariant object ● VoucherAddCatalogues object ● VoucherCountableEdge object ● VoucherCreate object ● VoucherDelete object ● VoucherRemoveCatalogues object ● VoucherUpdate object

Implemented By

RefundMethod union

Was this page helpful?