For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
      • Storefront
          • Authentication
          • Catalog
          • Company
              • POSTCreate Company
              • GETGet Company Extra Fields
              • GETGet Company by User ID
              • GETList Company Users
              • GETValidate Frontend User Email
          • Orders
          • Request for Quote
          • Sales Rep
          • Shopping List
          • Store Settings
      • Management
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTB2BStorefrontCompanyCompanies

Get Company by User ID

GET
https://api-b2b.bigcommerce.com/api/v2/customers/:userId/companies
GET
/api/v2/customers/:userId/companies
$curl https://api-b2b.bigcommerce.com/api/v2/customers/123/companies \
> -H "Authorization: Bearer <token>"
200Retrieved
1{
2 "message": "string",
3 "code": 200,
4 "data": {
5 "companyId": "123456",
6 "companyName": "Great Buys",
7 "bcGroupName": "Tier 3 B2B Clients",
8 "copanyStatus": "0",
9 "description": "string",
10 "catalogId": "123456",
11 "extraFields": {
12 "extraFields": [
13 {
14 "fieldName": "Company_Tax_Code",
15 "fieldValue": "Code G"
16 }
17 ]
18 },
19 "state": "Texas",
20 "country": "United States",
21 "addressLine1": "512 Bluebonnet Lane",
22 "addressLine2": "Building 2",
23 "city": "Austin",
24 "zipCode": "78726"
25 }
26}
Returns information for the Company account that corresponds to the provided user ID. Equivalent Storefront GraphQL API Query: `userCompany`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground). You must use the `userId` value for the Company user to return the correct Company; the `customerId` value of the corresponding BigCommerce customer account is not supported.
Was this page helpful?
Previous

Get Company Extra Fields

Next

List Company Users

Built with

Returns information for the Company account that corresponds to the provided user ID.

Equivalent Storefront GraphQL API Query: userCompany. For more information, see the GraphQL Playground.

You must use the userId value for the Company user to return the correct Company; the customerId value of the corresponding BigCommerce customer account is not supported.

Authentication

AuthorizationBearer

Authentication header

HeaderArgumentDescription
AuthorizationBearer {{B2B_JWT_TOKEN}}You can obtain this token using the steps described in the REST Storefront API section[…]

Path parameters

userIdstringRequired
The unique ID for the customer account.

Response

OK
messagestring
codedoubleDefaults to 200
dataobject