---
title: "customerDelete"
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/customers/mutations/customer-delete'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/customers/mutations/customer-delete.md'
---
# customerDelete

删除客户

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

## Type Signature

`CustomerDeletePayload`

## Required Permissions

* `write_customers`

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

## Arguments

* `input`

  [CustomerDeleteInput!](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/customers/inputs/customer-delete-input.md)

  指定要删除的客户

## Returns

* `deletedCustomerId`

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

  被删除的客户ID

* `userErrors`

  [[BusinessCustomerUserError]](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/customers/objects/business-customer-user-error.md)

  错误信息

## Code Example

```graphql
mutation customerDelete($input: CustomerDeleteInput! ) {
	customerDelete(input: $input ) 
		 {
			# CustomerDeletePayload fields
		}
		
	}

```

## Variables

```json
{
  "input": {
    "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)。

