---
title: "discountAutomaticDelete"
description: "删除自动折扣"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20260901
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/mutations/discount-automatic-delete'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/mutations/discount-automatic-delete.md'
---
# discountAutomaticDelete

删除自动折扣

- **Required Scopes:** `write_discounts`
- **API Version:** v20260901
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Type Signature

`DiscountAutomaticDeletePayload`

## Required Permissions

* `write_discounts`

接口访问需要令牌，具体如何获取令牌请参考：[身份认证](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md)

## Arguments

* `id`

  [ID!](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/id.md)

  要删除的自动折扣的 ID

## Returns

* `deletedAutomaticDiscountId`

  [ID](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/id.md)

  删除的自动折扣ID

* `userErrors`

  [[DiscountUserError!]!](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-user-error.md)

  执行突变时发生的错误列表

## Code Example

```graphql
mutation discountAutomaticDelete($id: ID! ) {
	discountAutomaticDelete(id: $id ) 
		 {
			# DiscountAutomaticDeletePayload fields
		}
		
	}

```

## Variables

```json
{
  "id": {}
}
```

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

