---
title: "companyUpdate"
description: "Query company information."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/b-2-b/mutations/company-update'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/b-2-b/mutations/company-update.md'
---
# companyUpdate

Query company information.

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

## Required Permissions

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

* `companyId`

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

  Company id

* `input`

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

  Update the company's input information

## Returns

* `company`

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

  Company information

* `userErrors`

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

  Error message

## Examples

### Update company information

Updating company information requires bringing in the company's gid

**Request:**

```json
{
  "companyId": "gid://shopline/Company/6254924101557166237",
  "input": {
    "name": "test2"
  }
}

```

**Response:**

```json
{
  "data": {
    "data": {
      "companyUpdate": {
        "company": {
          "id": "gid://shopline/Company/gid://shopline/Company/6254924101557166237",
          "mainContact": {
            "customer": {
              "phone": "0086139****0643",
              "state": "NOT_INVITED",
              "createdAt": "2023-12-21T09:23:57.777Z",
              "displayName": "L*** S****",
              "email": "*********@example.com",
              "firstName": "L***",
              "updatedAt": "2023-12-21T09:23:58.372Z",
              "id": "gid://shopline/Customer/gid://shopline/Customer/4600093492",
              "lastName": "S****",
              "locale": "en"
            },
            "id": "gid://shopline/CompanyContact/gid://shopline/CompanyContact/gid://shopline/CompanyContact/gid://shopline/CompanyContact/4600093492",
            "createdAt": "2023-12-21T09:23:57.777Z"
          },
          "name": "test2"
        },
        "userErrors": []
      }
    }
  }
}
```

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

