---
title: "DiscountItemsInput"
description: "附加折扣的商品的输入字段。您可以通过产品 ID 或集合 ID 指定折扣商品"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-items-input'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-items-input.md'
---
# DiscountItemsInput

附加折扣的商品的输入字段。您可以通过产品 ID 或集合 ID 指定折扣商品

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

## Type Signature

`DiscountItemsInput`

## Input Fields

* `collections`

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

  附有折扣的系列

* `products`

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

  附加折扣的产品和产品变体

* `all`

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

  是否应选择所有项目

## Schema Definition

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

## Input field from

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

  客户购买的商品的 ID。这些项目可以是集合或产品

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

  附加折扣的商品的输入字段。您可以通过产品 ID 或集合 ID 指定折扣商品

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

