---
title: "companyContact"
description: "Company contact information query"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/b-2-b/queries/company-contact'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/b-2-b/queries/company-contact.md'
---
# companyContact

Company contact information query

- **Required Scopes:** `read_customers`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Required Permissions

* `read_customers`

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

* `id`

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

  Company contact id

## Returns

* `company`

  [Company](https://developer.shopline.com/docs/admin-graph-ql-api/b-2-b/objects/company.md)

  Company information

* `createdAt`

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

  Creation time

* `customer`

  [Customer](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer.md)

  Customer information

* `id`

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

  Contact id

* `isMainContact`

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

  Is the main contact person

* `locale`

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

  Language

* `updatedAt`

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

  Update time

## Examples

### Query company contact information

Query contact information based on contact id



**Request:**

```json
{
  companyContact(id:"gid://shopline/CompanyContact/4217281771") {
        id
        isMainContact
        company {
            id
            name
        }
        customer {
            id
            email
            phone
            firstName
            lastName
            numberOfOrders
            amountSpent {
                amount
                currencyCode
            }
            addresses {
               countryCodeV2
               address1
               address2
            }
            defaultAddress {
               countryCodeV2
               address1
               address2 
            }
            emailMarketingConsent {
                marketingState
                consentUpdatedAt
            }
        }
        createdAt
        updatedAt
  }
}

```

**Response:**

```json
{
  "data": {
    "data": {
      "companyContact": {
        "company": {
          "id": "6254924101557166237",
          "name": "S*****"
        },
        "createdAt": "2023-11-07T10:13:38.117Z",
        "customer": {
          "addresses": [],
          "emailMarketingConsent": {
            "consentUpdatedAt": "2023-11-07T10:13:39Z",
            "marketingState": "SUBSCRIBED"
          },
          "firstName": "S******",
          "id": "gid://shopline/Customer/4217281771",
          "lastName": "T******",
          "numberOfOrders": null,
          "phone": null,
          "amountSpent": null,
          "defaultAddress": null,
          "email": "******@example.com"
        },
        "id": "gid://shopline/CompanyContact/4217281771",
        "isMainContact": true,
        "updatedAt": "2023-12-21T10:34:54.575Z"
      }
    }
  }
}
```

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

