---
title: "DiscountApplication"
description: "折扣申请在申请时捕捉折扣源的意图。"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/discount-application'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/discount-application.md'
---
# DiscountApplication

折扣申请在申请时捕捉折扣源的意图。

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

## Type Signature

`DiscountApplication`

## Fields

* `code`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  使用的折扣代码的字符串

* `valueType`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  折扣应用的价值类型。

* `targetType`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  折扣适用的行类型。

* `value`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  折扣应用的价值。

* `targetSelection`

  [String!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  折扣分配给哪些 targetType 行。

## Schema Definition

```graphql
type DiscountApplication { 
	code: String
	valueType: String
	targetType: String
	value: String
	targetSelection: String! 
}
```

## Field from

* [DiscountAllocation](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/discount-allocation.md).discountApplication

  此分配金额的折扣来源

* [Checkout](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/objects/checkout.md).discountApplications

  已在结账时应用的折扣。

## Error Handling

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

