--- 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: unstable api_name: admin source_url: html: 'https://shopify.dev/docs/api/admin-graphql/unstable/objects/Company' md: 'https://shopify.dev/docs/api/admin-graphql/unstable/objects/Company.md' --- # Company object Requires `read_customers` access scope or `read_companies` access scope. Also: The API client must be installed on a Shopify Plus store. 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/unstable/connections/CompanyContactRoleConnection) non-null The list of roles for the company contacts. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/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/unstable/enums/CompanyContactRoleSortKeys) Default:ID Sort the underlying list by the given key. *** * contacts [Company​Contact​Connection!](https://shopify.dev/docs/api/admin-graphql/unstable/connections/CompanyContactConnection) non-null The list of contacts in the company. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Company​Contact​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/unstable/enums/CompanyContactSortKeys) Default:ID Sort the underlying list by the given key. * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * company\_id id - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` * company\_location\_id id * created\_at time * email string * * id id * location\_name string - Filter by `id` range. - Example: * `id:1234` * `id:>=1234` * `id:<=1234` * name string * role\_name string * status string * updated\_at time *** * contacts​Count [Count](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Count) The number of contacts that belong to the company. * created​At [Date​Time!](https://shopify.dev/docs/api/admin-graphql/unstable/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/unstable/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/unstable/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/unstable/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/unstable/connections/DraftOrderConnection) non-null The list of the company's draft orders. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Draft​Order​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/unstable/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). * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * created\_at time - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` * customer\_id id * * id id * source string - Filter by `id` range. - Example: * `id:1234` * `id:>=1234` * `id:<=1234` * status string * tag string * updated\_at time *** * events [Event​Connection!](https://shopify.dev/docs/api/admin-graphql/unstable/connections/EventConnection) non-null The paginated list of events associated with the host subject. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Event​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/unstable/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). * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. 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 * comments boolean * created\_at time * id id * subject\_type string - The action that occured. - Example: * `action:create` 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. - Example: * `false` * `true` Filter by the date and time when the event happened. - Example: * `created_at:>2020-10-21` * `created_at:=1234` * `id:<=1234` The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. Example: * `PRODUCT_VARIANT` * `PRODUCT` * `COLLECTION` *** * external​Id [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A unique externally-supplied ID for the company. * has​Timeline​Comment [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether the merchant added a timeline comment to the company. * id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) non-null A globally-unique ID. * lifetime​Duration [String!](https://shopify.dev/docs/api/admin-graphql/unstable/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/unstable/connections/CompanyLocationConnection) non-null The list of locations in the company. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Company​Location​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/unstable/enums/CompanyLocationSortKeys) Default:ID Sort the underlying list by the given key. * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * company\_id id - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` * created\_at time * external\_id string * * id id * ids string - Filter by `id` range. - Example: * `id:1234` * `id:>=1234` * `id:<=1234` * * metafields.{namespace}.{key} mixed * name string - 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). - Example: * `metafields.custom.on_sale:true` * `metafields.product.material:"gid://shopify/Metaobject/43458085"` * updated\_at time *** * locations​Count [Count](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Count) The number of locations that belong to the company. * main​Contact [Company​Contact](https://shopify.dev/docs/api/admin-graphql/unstable/objects/CompanyContact) The main contact for the company. * metafield [Metafield](https://shopify.dev/docs/api/admin-graphql/unstable/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. * namespace [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) ### Arguments The container the metafield belongs to. If omitted, the app-reserved namespace will be used. * key [String!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) required The key for the metafield. *** * metafields [Metafield​Connection!](https://shopify.dev/docs/api/admin-graphql/unstable/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. * namespace [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) ### Arguments The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. * keys [\[String!\]](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) List of keys of metafields in the format `namespace.key`, will be returned in the same format. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * metafields​By​Identifiers [\[Metafield\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Metafield) non-null The metafields associated with the resource matching the supplied list of namespaces and keys. * identifiers [\[Has​Metafields​Identifier!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/HasMetafieldsIdentifier) required ### Arguments The list of metafields to retrieve by namespace and key. *** * name [String!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) non-null The name of the company. * note [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A note about the company. * orders [Order​Connection!](https://shopify.dev/docs/api/admin-graphql/unstable/connections/OrderConnection) non-null The list of the company's orders. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Order​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/unstable/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). * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * cart\_token string * channel string * channel\_id id * chargeback\_status string * checkout\_token string * confirmation\_number string * created\_at time * credit\_card\_last4 string * current\_total\_price float * customer\_id id * delivery\_method string * discount\_code string * email string * financial\_status string * fraud\_protection\_level string * fulfillment\_location\_id id * fulfillment\_status string * gateway string * id id * location\_id id * metafields.{namespace}.{key} mixed * name string * payment\_id string * payment\_provider\_id id * po\_number string * processed\_at time * reference\_location\_id id * return\_status string * risk\_level string * sales\_channel string * shipping\_address\_validation\_result\_summary string * sku string * source\_identifier string * source\_name string * status string * subtotal\_line\_items\_quantity string * tag string * tag\_not string * test boolean * total\_weight string * updated\_at time - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` Filter by the cart token's unique value to track abandoned cart conversions or troubleshoot checkout issues. The token references the cart that's associated with an order. - Example: * `cart_token:abc123` Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) (`ChannelInformation.channelDefinition.handle`) field. - Example: * `channel:web` * `channel:web,pos` Filter by the channel [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.id) field. - Example: * `channel_id:123` Filter by the order's chargeback status. A chargeback occurs when a customer questions the legitimacy of a charge with their financial institution. - Valid values: * `accepted` * `charge_refunded` * `lost` * `needs_response` * `under_review` * `won` Example: * `chargeback_status:accepted` Filter by the checkout token's unique value to analyze conversion funnels or resolve payment issues. The checkout token's value references the checkout that's associated with an order. - Example: * `checkout_token:abc123` Filter by the randomly generated alpha-numeric identifier for an order that can be displayed to the customer instead of the sequential order name. This value isn't guaranteed to be unique. - Example: * `confirmation_number:ABC123` Filter by the date and time when the order was created in Shopify's system. - Example: * `created_at:2020-10-21T23:39:20Z` * `created_at:=5.00 current_total_price:<=20.99` Filter orders by the customer [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Customer#field-Customer.fields.id) field. - Example: * `customer_id:123` Filter by the delivery [`methodType`](https://shopify.dev/api/admin-graphql/2024-07/objects/DeliveryMethod#field-DeliveryMethod.fields.methodType) field. - Valid values: * `shipping` * `pick-up` * `retail` * `local` * `pickup-point` * `none` Example: * `delivery_method:shipping` Filter by the case-insensitive discount code that was applied to the order at checkout. Limited to the first discount code used on an order. Maximum characters: 255. - Example: * `discount_code:ABC123` Filter by the email address that's associated with the order to provide customer support or analyze purchasing patterns. - Example: * `email:example@shopify.com` Filter by the order [`displayFinancialStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) field. - Valid values: * `paid` * `pending` * `authorized` * `partially_paid` * `partially_refunded` * `refunded` * `voided` * `expired` Example: * `financial_status:authorized` Filter by the level of fraud protection that's applied to the order. Use this filter to manage risk or handle disputes. - Valid values: * `fully_protected` * `partially_protected` * `not_protected` * `pending` * `not_eligible` * `not_available` Example: * `fraud_protection_level:fully_protected` Filter by the fulfillment location [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment#field-Fulfillment.fields.location.id) (`Fulfillment.location.id`) field. - Example: * `fulfillment_location_id:123` Filter by the [`displayFulfillmentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFulfillmentStatus) field to prioritize shipments or monitor order processing. - Valid values: * `unshipped` * `shipped` * `fulfilled` * `partial` * `scheduled` * `on_hold` * `unfulfilled` * `request_declined` Example: * `fulfillment_status:fulfilled` Filter by the [`paymentGatewayNames`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.paymentGatewayNames) field. Use this filter to find orders that were processed through specific payment providers like Shopify Payments, PayPal, or other custom payment gateways. - Example: * `gateway:shopify_payments` Filter by `id` range. - Example: * `id:1234` * `id:>=1234` * `id:<=1234` Filter by the location [`id`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.id) that's associated with the order to view and manage orders for specific locations. For POS orders, locations must be defined in the Shopify admin under **Settings** > **Locations**. If no ID is provided, then the primary location of the shop is returned. - Example: * `location_id:123` 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). - Example: * `metafields.custom.on_sale:true` * `metafields.product.material:"gid://shopify/Metaobject/43458085"` Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) field. - Example: * `name:1001-A` Filter by the payment ID that's associated with the order to reconcile financial records or troubleshoot payment issues. - Example: * `payment_id:abc123` Filter by the ID of the payment provider that's associated with the order to manage payment methods or troubleshoot transactions. - Example: * `payment_provider_id:123` Filter by the order [`poNumber`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.poNumber) field. - Example: * `po_number:P01001` Filter by the order [`processedAt`](https://shopify.dev/api/admin-graphql/latest/objects/order#field-Order.fields.processedAt) field. - Example: * `processed_at:2021-01-01T00:00:00Z` Filter by the ID of a location that's associated with the order, such as locations from fulfillments, refunds, or the shop's primary location. - Example: * `reference_location_id:123` Filter by the order's [`returnStatus`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-Order.fields.returnStatus) to monitor returns processing and track which orders have active returns. - Valid values: * `return_requested` * `in_progress` * `inspection_complete` * `returned` * `return_failed` * `no_return` Example: * `return_status:in_progress` Filter by the order risk assessment [`riskLevel`](https://shopify.dev/api/admin-graphql/latest/objects/OrderRiskAssessment#field-OrderRiskAssessment.fields.riskLevel) field. - Valid values: * `high` * `medium` * `low` * `none` * `pending` Example: * `risk_level:high` Filter by the [sales channel](https://shopify.dev/docs/apps/build/sales-channels) where the order was made to analyze performance or manage fulfillment processes. - Example: * `sales_channel: some_sales_channel` Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). - Valid values: * `has_issues` * `no_issues` * `not_validated` Example: * `shipping_address_validation_result_summary:no_issues` Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). - Example: * `sku:ABC123` Filter by the ID of the order placed on the originating platform, such as a unique POS or third-party identifier. This value doesn't correspond to the Shopify ID that's generated from a completed draft order. - Example: * `source_identifier:1234-12-1000` Filter by the platform where the order was placed to distinguish between web orders, POS sales, draft orders, or third-party channels. Use this filter to analyze sales performance across different ordering methods. - Example: * `source_name:web` * `source_name:shopify_draft_order` Filter by the order's status to manage workflows or analyze the order lifecycle. - Valid values: * `open` * `closed` * `cancelled` * `not_closed` Example: * `status:open` Filter by the total number of items across all line items in an order. This filter supports both exact values and ranges, and is useful for identifying bulk orders or analyzing purchase volume patterns. - Example: * `subtotal_line_items_quantity:10` * `subtotal_line_items_quantity:5..20` Filter objects by the `tag` field. - Example: * `tag:my_tag` Filter by objects that don’t have the specified tag. - Example: * `tag_not:my_tag` Filter by test orders. Test orders are made using the [Shopify Bogus Gateway](https://help.shopify.com/manual/checkout-settings/test-orders/payments-test-mode#bogus-gateway) or a payment provider with test mode enabled. - Example: * `test:true` Filter by the order weight. This filter supports both exact values and ranges, and is to be used to filter orders by the total weight of all items (excluding packaging). It takes a unit of measurement as a suffix. It accepts the following units: g, kg, lb, oz. - Example: * `total_weight:10.5kg` * `total_weight:>=5g total_weight:<=20g` * `total_weight:.5 lb` Filter by the date and time when the order was last updated in Shopify's system. Example: * `updated_at:2020-10-21T23:39:20Z` * `updated_at:2020-10-21T23:39:20Z` * `created_at:=1234` * `id:<=1234` Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. - Example: * `key:some-key` Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. - Example: * `namespace:some-namespace` Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. - Example: * `owner_type:PRODUCT` Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. - Example: * `type:single_line_text_field` Filter by the date and time when the metafield definition was last updated. Example: * `updated_at:>2020-10-21T23:39:20Z` * `updated_at:[CompanyConnection.nodes](https://shopify.dev/docs/api/admin-graphql/unstable/connections/CompanyConnection#returns-nodes) * {}[CompanyContact.company](https://shopify.dev/docs/api/admin-graphql/unstable/objects/CompanyContact#field-CompanyContact.fields.company) * {}[CompanyContactRoleAssignment.company](https://shopify.dev/docs/api/admin-graphql/unstable/objects/CompanyContactRoleAssignment#field-CompanyContactRoleAssignment.fields.company) * {}[CompanyEdge.node](https://shopify.dev/docs/api/admin-graphql/unstable/objects/CompanyEdge#field-CompanyEdge.fields.node) * {}[CompanyLocation.company](https://shopify.dev/docs/api/admin-graphql/unstable/objects/CompanyLocation#field-CompanyLocation.fields.company) * {}[PurchasingCompany.company](https://shopify.dev/docs/api/admin-graphql/unstable/objects/PurchasingCompany#field-PurchasingCompany.fields.company) ### Possible type in * [Metafield​Reference](https://shopify.dev/docs/api/admin-graphql/unstable/unions/MetafieldReference) * [Metafield​Referencer](https://shopify.dev/docs/api/admin-graphql/unstable/unions/MetafieldReferencer) *** ## Queries * [companies](https://shopify.dev/docs/api/admin-graphql/unstable/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). * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Company​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/unstable/enums/CompanySortKeys) Default:ID Sort the underlying list by the given key. * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * active\_customers\_count integer - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` * created\_at time * external\_id id * * id id * metafields.{namespace}.{key} mixed * name string - Filter by `id` range. - Example: * `id:1234` * `id:>=1234` * `id:<=1234` 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). - Example: * `metafields.custom.on_sale:true` * `metafields.product.material:"gid://shopify/Metaobject/43458085"` * since\_date time * updated\_at time *** * [company](https://shopify.dev/docs/api/admin-graphql/unstable/queries/company) query Returns a `Company` resource by ID. * id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required ### Arguments The ID of the `Company` to return. *** *** ## \Company Queries ### Queried by * \[companies](https://shopify.dev/docs/api/admin-graphql/unstable/queries/companies) * \[company](https://shopify.dev/docs/api/admin-graphql/unstable/queries/company) *** ## Mutations * [company​Assign​Main​Contact](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/companyAssignMainContact) mutation Assigns the main contact for the company. * company​Id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required ### Arguments The ID of the company to assign the main contact to. * company​Contact​Id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required The ID of the company contact to be assigned as the main contact. *** * [company​Create](https://shopify.dev/docs/api/admin-graphql/unstable/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 `name` [returns an error](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companycreate?example=creating-a-company-without-a-name-returns-an-error). *** 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/unstable/input-objects/CompanyCreateInput) required ### Arguments The fields to use when creating the company. *** * [company​Revoke​Main​Contact](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/companyRevokeMainContact) mutation Revokes the main contact from the company. * company​Id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required ### Arguments The ID of the company to revoke the main contact from. *** * [company​Update](https://shopify.dev/docs/api/admin-graphql/unstable/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/unstable/scalars/ID) required ### Arguments The ID of the company to be updated. * input [Company​Input!](https://shopify.dev/docs/api/admin-graphql/unstable/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/unstable/mutations/companyAssignMainContact) * <\~>[company​Create](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/companyCreate) * <\~>[company​Revoke​Main​Contact](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/companyRevokeMainContact) * <\~>[company​Update](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/companyUpdate) *** ## Interfaces * * [Comment​Event​Subject](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/CommentEventSubject) interface * [Has​Events](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasEvents) interface * [Has​Metafield​Definitions](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasMetafieldDefinitions) interface * [Has​Metafields](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasMetafields) interface * [Navigable](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/Navigable) interface * [Node](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/Node) interface *** ## ||-Company Implements ### Implements * ||-[Comment​Event​Subject](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/CommentEventSubject) * ||-[Has​Events](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasEvents) * ||-[Has​Metafield​Definitions](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasMetafieldDefinitions) * ||-[Has​Metafields](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasMetafields) * ||-[Navigable](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/Navigable) * ||-[Node](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/Node)