---
title: "discountAutomaticBulkDelete"
description: "Delete automatic discounts in bulk."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/mutations/discount-automatic-bulk-delete'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/mutations/discount-automatic-bulk-delete.md'
---
# discountAutomaticBulkDelete

Delete automatic discounts in bulk.

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

## Type Signature

`DiscountAutomaticBulkDeletePayload`

## Required Permissions

* `write_discounts`

An access token is required to call this API. Refer to [Authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md) for more information about how to obtain the token.

## Arguments

* `ids`

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

  The IDs of the automatic discounts to delete.
  

* `search`

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

  The search query for filtering automatic discounts to delete.
  
  

## Returns

* `job`

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

  Asynchronous to delete automatic discounts.

* `userErrors`

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

  The list of errors.

## Code Example

```graphql
mutation discountAutomaticBulkDelete($ids: [ID] $search: String ) {
	discountAutomaticBulkDelete(ids: $ids, search: $search ) 
		 {
			# DiscountAutomaticBulkDeletePayload fields
		}
		
	}

```

## Variables

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

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

