Skip to content
Saleor
Esc
↑↓navigate↵open⌘Jpreview

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

voucher Query

Look up a voucher by ID or external reference.

Requires one of the following permissions:MANAGE_DISCOUNTS
voucher(id: ID, externalReference: String, channel: String): Voucher

Returns

Voucher

Show return type
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
  externalReference: 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!]
}

Arguments

id

id · ID

ID of the voucher.

externalReference

externalReference · String

External ID of the voucher.

Added in Saleor 3.23

channel

channel · String

Slug of a channel for which the data should be returned.


Schema: Saleor 3.23.43. Download SDL.

Last updated on April 13, 2026

Was this page helpful?