---
title: "DiscountCustomerBuys"
description: >
  Prerequisite items and prerequisite value required in the customer's order to apply the discount
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-customer-buys'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-customer-buys.md'
---
# DiscountCustomerBuys

Prerequisite items and prerequisite value required in the customer's order to apply the discount

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

## Type Signature

`DiscountCustomerBuys`

## Fields

* `items`

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

  Items required to qualify for the discount

* `value`

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

  The prerequisite for the discount to be applicable.

## Schema Definition

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

## Field from

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

  Eligible items for the discount and the quantity of each item the customer must purchase.

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

  Eligible items for the discount and the quantity of each item the customer must buy.

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

