> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/discounts/llms.txt)
> Source: https://docs.saleor.io/api-reference/discounts/objects/sale

# 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.

```graphql
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
}
```

<a id="fields"></a>

### Fields

<a id="id"></a>

#### [`id`](#id) ● [`ID!`](/api-reference/miscellaneous/scalars/id.md)

The ID of the sale.

<a id="private-metadata"></a>

#### [`privateMetadata`](#private-metadata) ● [`[MetadataItem!]!`](/api-reference/miscellaneous/objects/metadata-item.md)

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

<a id="private-metafield"></a>

#### [`privateMetafield`](#private-metafield) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

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

Tip: Use GraphQL aliases to fetch multiple keys.

<a id="sale-private-metafield-key"></a>

##### [`key`](#sale-private-metafield-key) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

<a id="private-metafields"></a>

#### [`privateMetafields`](#private-metafields) ● [`Metadata`](/api-reference/miscellaneous/scalars/metadata.md)

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

<a id="sale-private-metafields-keys"></a>

##### [`keys`](#sale-private-metafields-keys) ● [`[String!]`](/api-reference/miscellaneous/scalars/string.md)

<a id="metadata"></a>

#### [`metadata`](#metadata) ● [`[MetadataItem!]!`](/api-reference/miscellaneous/objects/metadata-item.md)

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

<a id="metafield"></a>

#### [`metafield`](#metafield) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

<a id="sale-metafield-key"></a>

##### [`key`](#sale-metafield-key) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

<a id="metafields"></a>

#### [`metafields`](#metafields) ● [`Metadata`](/api-reference/miscellaneous/scalars/metadata.md)

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

<a id="sale-metafields-keys"></a>

##### [`keys`](#sale-metafields-keys) ● [`[String!]`](/api-reference/miscellaneous/scalars/string.md)

<a id="name"></a>

#### [`name`](#name) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

The name of the sale.

<a id="type"></a>

#### [`type`](#type) ● [`SaleType!`](/api-reference/discounts/enums/sale-type.md)

Type of the sale, fixed or percentage.

<a id="start-date"></a>

#### [`startDate`](#start-date) ● [`DateTime!`](/api-reference/miscellaneous/scalars/date-time.md)

The start date and time of the sale.

<a id="end-date"></a>

#### [`endDate`](#end-date) ● [`DateTime`](/api-reference/miscellaneous/scalars/date-time.md)

The end date and time of the sale.

<a id="created"></a>

#### [`created`](#created) ● [`DateTime!`](/api-reference/miscellaneous/scalars/date-time.md)

The date and time when the sale was created.

<a id="updated-at"></a>

#### [`updatedAt`](#updated-at) ● [`DateTime!`](/api-reference/miscellaneous/scalars/date-time.md)

The date and time when the sale was updated.

<a id="categories"></a>

#### [`categories`](#categories) ● [`CategoryCountableConnection`](/api-reference/products/objects/category-countable-connection.md)

List of categories this sale applies to.

<a id="sale-categories-before"></a>

##### [`before`](#sale-categories-before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

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

<a id="sale-categories-after"></a>

##### [`after`](#sale-categories-after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

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

<a id="sale-categories-first"></a>

##### [`first`](#sale-categories-first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

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

<a id="sale-categories-last"></a>

##### [`last`](#sale-categories-last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

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

<a id="collections"></a>

#### [`collections`](#collections) ● [`CollectionCountableConnection`](/api-reference/products/objects/collection-countable-connection.md)

List of collections this sale applies to.

Requires the MANAGE\_DISCOUNTS permission.

<a id="sale-collections-before"></a>

##### [`before`](#sale-collections-before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

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

<a id="sale-collections-after"></a>

##### [`after`](#sale-collections-after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

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

<a id="sale-collections-first"></a>

##### [`first`](#sale-collections-first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

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

<a id="sale-collections-last"></a>

##### [`last`](#sale-collections-last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

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

<a id="products"></a>

#### [`products`](#products) ● [`ProductCountableConnection`](/api-reference/products/objects/product-countable-connection.md)

List of products this sale applies to.

Requires the MANAGE\_DISCOUNTS permission.

<a id="sale-products-before"></a>

##### [`before`](#sale-products-before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

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

<a id="sale-products-after"></a>

##### [`after`](#sale-products-after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

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

<a id="sale-products-first"></a>

##### [`first`](#sale-products-first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

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

<a id="sale-products-last"></a>

##### [`last`](#sale-products-last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

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

<a id="variants"></a>

#### [`variants`](#variants) ● [`ProductVariantCountableConnection`](/api-reference/products/objects/product-variant-countable-connection.md)

List of product variants this sale applies to.

Requires the MANAGE\_DISCOUNTS permission.

<a id="sale-variants-before"></a>

##### [`before`](#sale-variants-before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

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

<a id="sale-variants-after"></a>

##### [`after`](#sale-variants-after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

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

<a id="sale-variants-first"></a>

##### [`first`](#sale-variants-first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

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

<a id="sale-variants-last"></a>

##### [`last`](#sale-variants-last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

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

<a id="translation"></a>

#### [`translation`](#translation) ● [`SaleTranslation`](/api-reference/discounts/objects/sale-translation.md)

Returns translated sale fields for the given language code.

<a id="sale-translation-language-code"></a>

##### [`languageCode`](#sale-translation-language-code) ● [`LanguageCodeEnum!`](/api-reference/miscellaneous/enums/language-code-enum.md)

A language code to return the translation for sale.

<a id="channel-listings"></a>

#### [`channelListings`](#channel-listings) ● [`[SaleChannelListing!]`](/api-reference/discounts/objects/sale-channel-listing.md)

List of channels available for the sale.

Requires the MANAGE\_DISCOUNTS permission.

<a id="discount-value"></a>

#### [`discountValue`](#discount-value) ● [`Float`](/api-reference/miscellaneous/scalars/float.md)

Sale value.

<a id="currency"></a>

#### [`currency`](#currency) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Currency code for sale.

<a id="interfaces"></a>

### Interfaces

<a id="node"></a>

#### [`Node`](/api-reference/miscellaneous/interfaces/node.md)

An object with an ID

<a id="objectwithmetadata"></a>

#### [`ObjectWithMetadata`](/api-reference/miscellaneous/interfaces/object-with-metadata.md)

<a id="returned-by"></a>

### Returned By

[`sale`](/api-reference/deprecated/discounts/queries/sale.md) query

<a id="member-of"></a>

### Member Of

[`SaleAddCatalogues`](/api-reference/discounts/objects/sale-add-catalogues.md) object  ● [`SaleChannelListingUpdate`](/api-reference/discounts/objects/sale-channel-listing-update.md) object  ● [`SaleCountableEdge`](/api-reference/discounts/objects/sale-countable-edge.md) object  ● [`SaleCreate`](/api-reference/discounts/objects/sale-create.md) object  ● [`SaleCreated`](/api-reference/discounts/objects/sale-created.md) object  ● [`SaleDelete`](/api-reference/discounts/objects/sale-delete.md) object  ● [`SaleDeleted`](/api-reference/discounts/objects/sale-deleted.md) object  ● [`SaleRemoveCatalogues`](/api-reference/discounts/objects/sale-remove-catalogues.md) object  ● [`SaleToggle`](/api-reference/discounts/objects/sale-toggle.md) object  ● [`SaleTranslatableContent`](/api-reference/discounts/objects/sale-translatable-content.md) object  ● [`SaleTranslate`](/api-reference/discounts/objects/sale-translate.md) object  ● [`SaleUpdate`](/api-reference/discounts/objects/sale-update.md) object  ● [`SaleUpdated`](/api-reference/discounts/objects/sale-updated.md) object
