---
title: "DiscountAutomaticDoni"
description: >
  An automatic discount that offers customers a Discount on Nth item(DONI) 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-automatic-doni'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-automatic-doni.md'
---
# DiscountAutomaticDoni

An automatic discount that offers customers a Discount on Nth item(DONI) discount.

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

## Type Signature

`DiscountAutomaticDoni`

## Fields

* `asyncUsageCount`

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

  The number of times the discount has been used. This value is updated asynchronously and might differ from the actual usage count.

* `combinesWith`

  [DiscountCombinesWith](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-combines-with.md)

  Discount classes the discount can combine with.

* `createdAt`

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

  The time when the discount was created.

* `customerGets`

  [DiscountCustomerGets](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-customer-gets.md)

  The qualifying items in an order, the quantity of each one, and the total value of the discount.

* `discountClass`

  [MerchandiseDiscountClass](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/enums/merchandise-discount-class.md)

  The class of the discount

* `endsAt`

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

  The time when the discount ends. For open-ended discounts, use null.

* `minimumRequirement`

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

  Minimum subtotal or quantity required to apply the discount.

* `shortSummary`

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

  Minimum subtotal or quantity required to apply the discount.

* `startsAt`

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

  The time when discount starts.

* `status`

  [DiscountStatus](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/enums/discount-status.md)

  The status of the discount.

* `summary`

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

  折扣的详细摘要	Summary of the discount.

* `title`

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

  The title of the discount.

* `updatedAt`

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

  The time when the discount was updated.

## Schema Definition

```graphql
type DiscountAutomaticDoni { 
	asyncUsageCount: Int
	combinesWith: DiscountCombinesWith
	createdAt: Date
	customerGets: DiscountCustomerGets
	discountClass: MerchandiseDiscountClass
	endsAt: Date
	minimumRequirement: DiscountMinimumRequirement
	shortSummary: String
	startsAt: Date
	status: DiscountStatus
	summary: String
	title: String
	updatedAt: Date 
}
```

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

