---
title: "DiscountItemsInput"
description: >
  The input fields for the items attached to a discount. You can specify the discount items by product ID or collection ID.
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-items-input'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-items-input.md'
---
# DiscountItemsInput

The input fields for the items attached to a discount. You can specify the discount items by product ID or collection ID.

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Input

## Type Signature

`DiscountItemsInput`

## Input Fields

* `all`

  [Boolean](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/boolean.md)

  Whether all items should be selected.
  
  

* `collections`

  [DiscountCollectionsInput](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/inputs/discount-collections-input.md)

  The collections that are attached to a discount.
  

* `products`

  [DiscountProductsInput](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/inputs/discount-products-input.md)

  The products and product variants that are attached to a discount.

## Schema Definition

```graphql
input DiscountItemsInput { 
	all: Boolean
	collections: DiscountCollectionsInput
	products: DiscountProductsInput 
}
```

## Input field from

* [DiscountCustomerBuysInput](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-customer-buys-input.md).items

  The IDs of items that the customer buys. The items can be either collections or products.

* [DiscountCustomerGetsInput](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-customer-gets-input.md).items

  The input fields for the items attached to a discount. You can specify the discount items by product ID or collection ID.

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

