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

公司地点信息查询

- **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

* `companyId`

  [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
{
  "companyId": "gid://shopline/Company/6254924101557166237",
  "input": {
    "email": "******@example.com",
    "firstName": "S*****",
    "lastName": "T*****",
    "locale": "en",
    "phone": "0086139****9732"
  }
}

```

**Response:**

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

