---
title: "companyContactsDelete"
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/b-2-b/mutations/company-contacts-delete'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/b-2-b/mutations/company-contacts-delete.md'
---
# companyContactsDelete

公司联系人批量删除

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

## Type Signature

`CompanyContactsDeletePayload`

## Required Permissions

* `write_customers`

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

## Arguments

* `companyContactIds`

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

  联系人id数组（最大100）

## Returns

* `deletedCompanyContactIds`

  [[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 companyContactsDelete($companyContactIds: [ID!] ) {
	companyContactsDelete(companyContactIds: $companyContactIds ) 
		 {
			# CompanyContactsDeletePayload fields
		}
		
	}

```

## Variables

```json
{
  "companyContactIds": {}
}
```

## Examples

### 批量删除公司联系人

支持删除多个公司联系人，最大支持100

**Request:**

```json
{
  "companyContactIds": [
    "gid://shopline/CompanyContact/4217281771",
    "gid://shopline/CompanyContact/4600093512"
  ]
}

```

**Response:**

```json
{
  "data": {
    "data": {
      "companyContactsDelete": {
        "deletedCompanyContactIds": [
          "gid://shopline/CompanyContact/4217281771",
          "gid://shopline/CompanyContact/4600093512"
        ],
        "userErrors": []
      }
    }
  }
}
```

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

