---
title: "AppDiscountType"
description: "Script to define discount types."
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/app-discount-type'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/app-discount-type.md'
---
# AppDiscountType

Script to define discount types.

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

## Type Signature

`AppDiscountType`

## Fields

* `appKey`

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

  Provide the client ID of the application applying the discount type.

* `description`

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

  description

* `discountClass`

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

  The class of the app discount type.
  
  

* `functionId`

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

  Function ID

* `targetType`

  [DiscountApplicationTargetType](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/enums/discount-application-target-type.md)

  Target type for applying the discount type.

* `title`

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

  title

## Schema Definition

```graphql
type AppDiscountType { 
	appKey: String
	description: String
	discountClass: DiscountClass
	functionId: String
	targetType: DiscountApplicationTargetType
	title: String 
}
```

## Field from

* [Query](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/queries/app-discount-type.md).appDiscountType

  应用折扣类型

* [Query](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/queries/app-discount-types.md).appDiscountTypes

  应用程序安装的应用程序折扣类型列表

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

  Provide the application discount type for the discount type.

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

