---
title: "DiscountProductsInput"
description: "折扣可以应用的商品和商品款式列表。"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/products-and-collections/inputs/discount-products-input'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/products-and-collections/inputs/discount-products-input.md'
---
# DiscountProductsInput

折扣可以应用的商品和商品款式列表。

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

## Input Fields

* `productVariantsToAdd`

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

  指定需要添加到活动中的商品款式列表。若传入，同时必须在 productsToAdd 传入匹配的商品 ID 列表。
  最大个数限制：1000

* `productsToAdd`

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

  指定需要添加到活动中的商品 ID 列表。
  最大个数限制：1000

* `productVariantsToRemove`

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

  指定需要添加到活动中的商品款式列表。若传入，同时必须在 productsToRemove 传入匹配的商品 ID 列表。
  最大个数限制：1000

* `productsToRemove`

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

  指定需要从活动中移除的商品 ID 列表。
  最大个数限制：1000

## Input field from

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

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes)。

