---
title: "DiscountProductsInput"
description: "The products and product variants that are attached to a discount."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/inputs/discount-products-input'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/inputs/discount-products-input.md'
---
# DiscountProductsInput

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

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

## Input Fields

* `productVariantsToAdd`

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

  Specify the list of product variant IDs to be added. If provided, a matching list of product IDs must also be provided in productsToAdd.
  Maximum size: 1000

* `productsToAdd`

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

  Specify the list of product IDs to be added. 
  Maximum size: 1000

* `productVariantsToRemove`

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

  Specify the list of product variant IDs to be removed. If provided, a matching list of product IDs must also be provided in productsToRemove.
  Maximum size: 1000

* `productsToRemove`

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

  Specify the list of product IDs to be removed. 
  Maximum size: 1000

## Input field from

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

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

