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

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

Sale Object

Sales allow creating discounts for categories, collections or products and are visible to all the customers.

DEPRECATED: this type will be removed. Use Promotion type instead.

type Sale 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!
  type: SaleType!
  startDate: DateTime!
  endDate: DateTime
  created: DateTime!
  updatedAt: DateTime!
  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
  translation(languageCode: LanguageCodeEnum!): SaleTranslation
  channelListings: [SaleChannelListing!]
  discountValue: Float
  currency: String
}

Interfaces

Node, ObjectWithMetadata

Fields

id

id · ID!

The ID of the sale.

privateMetadata

privateMetadata · [MetadataItem!]!

List of private metadata items. Requires staff permissions to access.

privateMetafield

privateMetafield · String

A single key from private metadata. Requires staff permissions to access.

Tip: Use GraphQL aliases to fetch multiple keys.

key

key · String!

privateMetafields

privateMetafields · Metadata

Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.

keys

keys · [String!]

metadata

metadata · [MetadataItem!]!

List of public metadata items. Can be accessed without permissions.

metafield

metafield · String

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

key

key · String!

metafields

metafields · Metadata

Public metadata. Use keys to control which fields you want to include. The default is to include everything.

keys

keys · [String!]

name

name · String!

The name of the sale.

type

type · SaleType!

Type of the sale, fixed or percentage.

startDate

startDate · DateTime!

The start date and time of the sale.

endDate

endDate · DateTime

The end date and time of the sale.

created

created · DateTime!

The date and time when the sale was created.

updatedAt

updatedAt · DateTime!

The date and time when the sale was updated.

categories

categories · CategoryCountableConnection

List of categories this sale applies to.

before

before · String

Return the elements in the list that come before the specified cursor.

after

after · String

Return the elements in the list that come after the specified cursor.

first

first · Int

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

last

last · Int

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

collections

collections · CollectionCountableConnection

List of collections this sale applies to.

Requires one of the following permissions:MANAGE_DISCOUNTS

before

before · String

Return the elements in the list that come before the specified cursor.

after

after · String

Return the elements in the list that come after the specified cursor.

first

first · Int

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

last

last · Int

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

products

products · ProductCountableConnection

List of products this sale applies to.

Requires one of the following permissions:MANAGE_DISCOUNTS

before

before · String

Return the elements in the list that come before the specified cursor.

after

after · String

Return the elements in the list that come after the specified cursor.

first

first · Int

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

last

last · Int

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

variants

variants · ProductVariantCountableConnection

List of product variants this sale applies to.

Requires one of the following permissions:MANAGE_DISCOUNTS

before

before · String

Return the elements in the list that come before the specified cursor.

after

after · String

Return the elements in the list that come after the specified cursor.

first

first · Int

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

last

last · Int

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

translation

translation · SaleTranslation

Returns translated sale fields for the given language code.

languageCode

languageCode · LanguageCodeEnum!

A language code to return the translation for sale.

channelListings

channelListings · [SaleChannelListing!]

List of channels available for the sale.

Requires one of the following permissions:MANAGE_DISCOUNTS

discountValue

discountValue · Float

Sale value.

currency

currency · String

Currency code for sale.

Used by


Schema: Saleor 3.23.43. Download SDL.

Last updated on April 13, 2026

Was this page helpful?