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

批量异步删除自动折扣

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

## Type Signature

`DiscountAutomaticBulkDeletePayload`

## Required Permissions

* `write_discounts`

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

## Arguments

* `ids`

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

  要删除的自动折扣的 ID

* `search`

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

  用于筛选要删除的自动折扣的搜索查询

## Returns

* `job`

  [Job](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common-objects/objects/job.md)

  异步作业删除自动折扣

* `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 discountAutomaticBulkDelete($ids: [ID] $search: String ) {
	discountAutomaticBulkDelete(ids: $ids, search: $search ) 
		 {
			# DiscountAutomaticBulkDeletePayload fields
		}
		
	}

```

## Variables

```json
{
  "ids": {},
  "search": {}
}
```

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

