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

公司联系人更新

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

## Required Permissions

* `write_customers`

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

## Arguments

* `companyContactId`

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

  公司联系人id

* `input`

  [CompanyContactInput!](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/b-2-b/inputs/company-contact-input.md)

  公司联系人信息输入

## Returns

* `companyContact`

  [CompanyContact](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/b-2-b/objects/company-contact.md)

  公司联系人信息

* `userErrors`

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

  错误信息

## Examples

### 更新公司联系人信息

更新公司联系人的用户邮箱，手机号，姓名等等

**Request:**

```json
{
  "companyContactId": "gid://shopline/CompanyContact/4600093512",
  "input": {
    "email": "*******@example.com",
    "firstName": "S*****",
    "lastName": "T*****",
    "locale": "en",
    "phone": "0086139****5903"
  }
}


```

**Response:**

```json
{
  "data": {
    "data": {
      "companyContactUpdate": {
        "companyContact": {
          "isMainContact": false,
          "updatedAt": "2023-12-21T10:41:17.580Z",
          "company": {
            "id": "gid://shopline/Company/6254924101557166237",
            "name": "test2"
          },
          "createdAt": "2023-12-21T10:25:42.374Z",
          "customer": {
            "phone": "0086139****5903",
            "addresses": [],
            "email": "*******@example.com",
            "firstName": "S*****",
            "id": "gid://shopline/Customer/gid://shopline/Customer/4600093512",
            "lastName": "T*****"
          },
          "id": "gid://shopline/CompanyContact/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)。

