---
title: "DiscountCustomerBuys"
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/discounts-and-marketing/objects/discount-customer-buys'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-customer-buys.md'
---
# DiscountCustomerBuys

客户在订单上必须具备的先决条件项目和先决条件价值才能适用折扣

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

## Type Signature

`DiscountCustomerBuys`

## Fields

* `items`

  [DiscountItems](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/unions/discount-items.md)

  适用折扣所需的商品

* `value`

  [DiscountCustomerBuysValue](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/customers/unions/discount-customer-buys-value.md)

  适用折扣的前提条件

## Schema Definition

```graphql
type DiscountCustomerBuys { 
	items: DiscountItems
	value: DiscountCustomerBuysValue 
}
```

## Field from

* [DiscountCodeBxgy](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-bxgy.md).customerBuys

  符合折扣资格的商品以及客户必须购买的每件商品的数量

* [DiscountAutomaticBxgy](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-automatic-bxgy.md).customerBuys

  符合折扣资格的商品以及客户必须购买的每件商品的数量

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

