---
title: Company - GraphQL Admin
description: >-
  A business entity that purchases from the shop as part of B2B commerce.

  Companies organize multiple locations and contacts who can place orders on

  behalf of the organization.
  [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation)

  objects can have custom pricing through
  [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog)
  and
  [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList)

  configurations.
api_version: 2026-04
source_url:
  html: 'https://shopify.dev/docs/api/admin-graphql/latest/objects/Company'
  md: 'https://shopify.dev/docs/api/admin-graphql/latest/objects/Company.md'
api_name: admin
api_type: graphql
type: object
metadata:
  domain: admin
---

# Company

object

Requires `read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.

A business entity that purchases from the shop as part of B2B commerce. Companies organize multiple locations and contacts who can place orders on behalf of the organization. [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) objects can have custom pricing through [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) and [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) configurations.

## Fields

* contact​Roles

  [Company​Contact​Role​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/CompanyContactRoleConnection)

  non-null

  The list of roles for the company contacts.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Company​Contact​Role​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/CompanyContactRoleSortKeys)

    Default:ID

    Sort the underlying list by the given key.

  ***

* contacts

  [Company​Contact​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/CompanyContactConnection)

  non-null

  The list of contacts in the company.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators.

    | name | type | description | acceptable\_values | default\_value | example\_use |
    | - | - | - | - | - | - |
    | default | string | Filter by a case-insensitive search of multiple fields | | | |
    | in a document. | | | - `query=Bob Norman` - `query=title:green hoodie` | | |
    | company\_id | id | | | | |
    | company\_location\_id | id | | | | |
    | created\_at | time | | | | |
    | email | string | | | | |
    | id | id | Filter by `id` range. | | | - `id:1234` - `id:>=1234` - `id:<=1234` |
    | location\_name | string | | | | |
    | name | string | | | | |
    | role\_name | string | | | | |
    | status | string | | | | |
    | updated\_at | time | | | | |
    | You can apply one or more filters to a query. Learn more about \[Shopify API | | | | | |
    | search syntax]\(<https://shopify.dev/api/usage/search-syntax>). | | | | | |

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Company​Contact​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/CompanyContactSortKeys)

    Default:ID

    Sort the underlying list by the given key.

  ***

* contacts​Count

  [Count](https://shopify.dev/docs/api/admin-graphql/latest/objects/Count)

  The number of contacts that belong to the company.

* created​At

  [Date​Time!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/DateTime)

  non-null

  The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was created in Shopify.

* customer​Since

  [Date​Time!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/DateTime)

  non-null

  The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company became the customer.

* default​Cursor

  [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  non-null

  A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID.

* default​Role

  [Company​Contact​Role](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContactRole)

  The role proposed by default for a contact at the company.

* draft​Orders

  [Draft​Order​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/DraftOrderConnection)

  non-null

  The list of the company's draft orders.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators.

    | name | type | description | acceptable\_values | default\_value | example\_use |
    | - | - | - | - | - | - |
    | default | string | Filter by a case-insensitive search of multiple fields | | | |
    | in a document. | | | - `query=Bob Norman` - `query=title:green hoodie` | | |
    | created\_at | time | | | | |
    | customer\_id | id | | | | |
    | id | id | Filter by `id` range. | | | - `id:1234` - `id:>=1234` - `id:<=1234` |
    | source | string | | | | |
    | status | string | | | | |
    | tag | string | | | | |
    | updated\_at | time | | | | |
    | You can apply one or more filters to a query. Learn more about \[Shopify API | | | | | |
    | search syntax]\(<https://shopify.dev/api/usage/search-syntax>). | | | | | |

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Draft​Order​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/DraftOrderSortKeys)

    Default:ID

    Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

  ***

* events

  [Event​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/EventConnection)

  non-null

  The paginated list of events associated with the host subject.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators. | comments | boolean | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events. | | | - `false`\
    \- `true` | | created\_at | time | Filter by the date and time when the event occurred. Event data is retained for 1 year. | | | - `created_at:>2025-10-21`\
    \- `created_at:<now` | | id | id | Filter by `id` range. | | | - `id:1234`\
    \- `id:>=1234`\
    \- `id:<=1234` | | subject\_type | string | The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `PRODUCT_VARIANT`\
    \- `PRODUCT`\
    \- `COLLECTION` | You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).

    * action

      string

      The action that occured.

      Example:

      * `action:create`

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Event​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/EventSortKeys)

    Default:ID

    Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

  ***

* external​Id

  [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  A unique externally-supplied ID for the company.

* has​Timeline​Comment

  [Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

  non-null

  Whether the merchant added a timeline comment to the company.

* id

  [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

  non-null

  A globally-unique ID.

* lifetime​Duration

  [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  non-null

  The lifetime duration of the company, since it became a customer of the shop. Examples: `2 days`, `3 months`, `1 year`.

* locations

  [Company​Location​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/CompanyLocationConnection)

  non-null

  The list of locations in the company.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators.

    | name | type | description | acceptable\_values | default\_value | example\_use |
    | - | - | - | - | - | - |
    | default | string | Filter by a case-insensitive search of multiple fields | | | |
    | in a document. | | | - `query=Bob Norman` - `query=title:green hoodie` | | |
    | company\_id | id | | | | |
    | created\_at | time | | | | |
    | external\_id | string | | | | |
    | id | id | Filter by `id` range. | | | - `id:1234` - `id:>=1234` - `id:<=1234` |
    | ids | string | | | | |
    | metafields.{namespace}.{key} | mixed | Filters resources by metafield | | | |
    | value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about | | | | | |
    | [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | | | |
    | | | - `metafields.custom.on_sale:true` - | | | |
    | `metafields.product.material:"gid://shopify/Metaobject/43458085"` | | | | | |
    | name | string | | | | |
    | updated\_at | time | | | | |
    | You can apply one or more filters to a query. Learn more about \[Shopify API | | | | | |
    | search syntax]\(<https://shopify.dev/api/usage/search-syntax>). | | | | | |

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Company​Location​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/CompanyLocationSortKeys)

    Default:ID

    Sort the underlying list by the given key.

  ***

* locations​Count

  [Count](https://shopify.dev/docs/api/admin-graphql/latest/objects/Count)

  The number of locations that belong to the company.

* main​Contact

  [Company​Contact](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact)

  The main contact for the company.

* metafield

  [Metafield](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield)

  A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.

  * key

    [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    required

    ### Arguments

    The key for the metafield.

  * namespace

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

  ***

* metafields

  [Metafield​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/MetafieldConnection)

  non-null

  A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) that a merchant associates with a Shopify resource.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * keys

    [\[String!\]](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    List of keys of metafields in the format `namespace.key`, will be returned in the same format.

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * namespace

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The metafield namespace to filter by. If omitted, all metafields are returned.

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  ***

* name

  [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  non-null

  The name of the company.

* note

  [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  A note about the company.

* orders

  [Order​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/OrderConnection)

  non-null

  The list of the company's orders.

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Order​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderSortKeys)

    Default:ID

    Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

  ***

* orders​Count

  [Count](https://shopify.dev/docs/api/admin-graphql/latest/objects/Count)

  The total number of orders placed for this company, across all its locations.

* total​Spent

  [Money​V2!](https://shopify.dev/docs/api/admin-graphql/latest/objects/MoneyV2)

  non-null

  The total amount spent by this company, across all its locations.

* updated​At

  [Date​Time!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/DateTime)

  non-null

  The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified.

### Deprecated fields

* contact​Count

  [Int!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

  non-nullDeprecated

* metafield​Definitions

  [Metafield​Definition​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/MetafieldDefinitionConnection)

  non-nullDeprecated

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * namespace

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    Filter metafield definitions by namespace.

  * pinned​Status

    [Metafield​Definition​Pinned​Status](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldDefinitionPinnedStatus)

    Default:ANY

    Filter by the definition's pinned status.

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators.

    | name | type | description | acceptable\_values | default\_value | example\_use |
    | - | - | - | - | - | - |
    | default | string | Filter by a case-insensitive search of multiple fields | | | |
    | in a document. | | | - `query=Bob Norman` - `query=title:green hoodie` | | |
    | created\_at | time | Filter by the date and time when the metafield | | | |
    | definition was created. | | | - `created_at:>2020-10-21T23:39:20Z` - | | |
    | `created_at:<now` - `created_at:<=2024` | | | | | |
    | id | id | Filter by `id` range. | | | - `id:1234` - `id:>=1234` - `id:<=1234` |
    | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) | | | |
    | field. | | | - `key:some-key` | | |
    | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) | | | |
    | field. | | | - `namespace:some-namespace` | | |
    | owner\_type | string | Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) | | | |
    | field. | | | - `owner_type:PRODUCT` | | |
    | type | string | Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) | | | |
    | field. | | | - `type:single_line_text_field` | | |
    | updated\_at | time | Filter by the date and time when the metafield | | | |
    | definition was last updated. | | | - `updated_at:>2020-10-21T23:39:20Z`  | | |

    * `updated_at:<now`\
      \- `updated_at:<=2024` | You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Metafield​Definition​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldDefinitionSortKeys)

    Default:ID

    Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

  ***

***

## Map

### Fields and connections with this object

* [CompanyConnection.nodes](https://shopify.dev/docs/api/admin-graphql/latest/connections/CompanyConnection#returns-nodes)
* [CompanyContact.company](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact#field-CompanyContact.fields.company)
* [CompanyContactRoleAssignment.company](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContactRoleAssignment#field-CompanyContactRoleAssignment.fields.company)
* [CompanyEdge.node](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyEdge#field-CompanyEdge.fields.node)
* [CompanyLocation.company](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation#field-CompanyLocation.fields.company)
* [PurchasingCompany.company](https://shopify.dev/docs/api/admin-graphql/latest/objects/PurchasingCompany#field-PurchasingCompany.fields.company)

### Possible type in

* [Metafield​Reference](https://shopify.dev/docs/api/admin-graphql/latest/unions/MetafieldReference)
* [Metafield​Referencer](https://shopify.dev/docs/api/admin-graphql/latest/unions/MetafieldReferencer)

***

## Queries

* [companies](https://shopify.dev/docs/api/admin-graphql/latest/queries/companies)

  query

  A paginated list of companies in the shop. [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) objects are business entities that purchase from the merchant.

  Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/companies#arguments-query) argument to filter companies by attributes like name or externalId. Sort and paginate results to handle large datasets efficiently. Learn more about [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax).

  * after

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * query

    [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

    A filter made up of terms, connectives, modifiers, and comparators.

    | name | type | description | acceptable\_values | default\_value | example\_use |
    | - | - | - | - | - | - |
    | default | string | Filter by a case-insensitive search of multiple fields | | | |
    | in a document. | | | - `query=Bob Norman` - `query=title:green hoodie` | | |
    | active\_customers\_count | integer | | | | |
    | created\_at | time | | | | |
    | external\_id | id | | | | |
    | id | id | Filter by `id` range. | | | - `id:1234` - `id:>=1234` - `id:<=1234` |
    | metafields.{namespace}.{key} | mixed | Filters resources by metafield | | | |
    | value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about | | | | | |
    | [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value). | | | | | |
    | | | - `metafields.custom.on_sale:true` - | | | |
    | `metafields.product.material:"gid://shopify/Metaobject/43458085"` | | | | | |
    | name | string | | | | |
    | ordering\_status | string | | | | |
    | since\_date | time | | | | |
    | updated\_at | time | | | | |
    | You can apply one or more filters to a query. Learn more about \[Shopify API | | | | | |
    | search syntax]\(<https://shopify.dev/api/usage/search-syntax>). | | | | | |

  * reverse

    [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Company​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/latest/enums/CompanySortKeys)

    Default:ID

    Sort the underlying list by the given key.

  ***

* [company](https://shopify.dev/docs/api/admin-graphql/latest/queries/company)

  query

  Returns a `Company` resource by ID.

  * id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the `Company` to return.

  ***

***

## Company Queries

### Queried by

* [companies](https://shopify.dev/docs/api/admin-graphql/latest/queries/companies)
* [company](https://shopify.dev/docs/api/admin-graphql/latest/queries/company)

***

## Mutations

* [company​Assign​Main​Contact](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companyAssignMainContact)

  mutation

  Assigns the main contact for the company.

  * company​Contact​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the company contact to be assigned as the main contact.

  * company​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    The ID of the company to assign the main contact to.

  ***

* [company​Create](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companyCreate)

  mutation

  Creates a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) for B2B commerce. This mutation creates the company and can optionally create an initial [`CompanyContact`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact) and [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) in a single operation. Company contacts are people who place orders on behalf of the company. Company locations are branches or offices with their own billing and shipping addresses.

  ***

  **Note:** Creating a company without a \<code>name\</code> \<a href="https://shopify.dev/docs/api/admin-graphql/latest/mutations/companycreate?example=creating-a-company-without-a-name-returns-an-error">returns an error\</a>.

  ***

  Learn more about [creating companies for B2B](https://shopify.dev/docs/apps/build/b2b/start-building#step-1-create-a-company).

  * input

    [Company​Create​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CompanyCreateInput)

    required

    ### Arguments

    The fields to use when creating the company.

  ***

* [company​Revoke​Main​Contact](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companyRevokeMainContact)

  mutation

  Revokes the main contact from the company.

  * company​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the company to revoke the main contact from.

  ***

* [company​Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companyUpdate)

  mutation

  Updates a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) with new information. Companies represent business customers that can have multiple contacts and locations with specific pricing, payment terms, and checkout settings.

  The mutation accepts the company's ID and an input object containing the fields to update. You can modify the company name, add or update internal notes, set an external ID for integration with other systems, or adjust the customer relationship start date.

  Learn more about [building B2B features](https://shopify.dev/docs/apps/build/b2b/start-building).

  * company​Id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    required

    ### Arguments

    The ID of the company to be updated.

  * input

    [Company​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CompanyInput)

    required

    The input fields to update the company.

  ***

***

## Company Mutations

### Mutated by

* [company​Assign​Main​Contact](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companyAssignMainContact)
* [company​Create](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companyCreate)
* [company​Revoke​Main​Contact](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companyRevokeMainContact)
* [company​Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companyUpdate)

***

## Interfaces

* * [Comment​Event​Subject](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/CommentEventSubject)

    interface

  * [Has​Events](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasEvents)

    interface

  * [Has​Metafield​Definitions](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasMetafieldDefinitions)

    interface

  * [Has​Metafields](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasMetafields)

    interface

  * [Navigable](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Navigable)

    interface

  * [Node](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Node)

    interface

***

## Company Implements

### Implements

* [Comment​Event​Subject](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/CommentEventSubject)
* [Has​Events](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasEvents)
* [Has​Metafield​Definitions](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasMetafieldDefinitions)
* [Has​Metafields](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasMetafields)
* [Navigable](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Navigable)
* [Node](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Node)
