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
  • Overview
    • Quick Start
    • Sandboxes
    • Tools & SDKs
    • Support
  • Docs
    • Archive
    • Closed Beta Programs
        • Overview
        • API Reference
              • GETList Companies
              • POSTCreate Company
              • GETGet Company Detail
              • PUTUpdate Company
              • DELDelete Company
              • POSTConvert from BigCommerce CustomerGroup into Company
              • POSTBulk Create Companies
              • PUTUpdate Companies (batch)
              • PUTUpdate Company's Catalog
              • PUTUpdate Company's Status
              • GETList Company Extra Field Configs
              • GETList Company Attachments
              • POSTAdd Company Attachment
              • DELDelete Company Attachment
              • GETList Company Subsidiaries
              • DELDelete Company Subsidiary
              • POSTAttach Company as Parent to Current Company
              • GETList Company Hierarchy
Dev Portal
LogoLogo
Closed Beta ProgramsB2B Edition UpdatesAPI ReferenceCompany

List Company Hierarchy

Beta
GET
https://api-b2b.bigcommerce.com/api/v3/io/companies/:companyId/hierarchy
GET
/api/v3/io/companies/:companyId/hierarchy
$curl https://api-b2b.bigcommerce.com/api/v3/io/companies/1/hierarchy \
> -H "authToken: <apiKey>" \
> -H "Content-Type: application/json"
1{
2 "data": [
3 {
4 "companyId": 101,
5 "companyName": "Global Tech Holdings",
6 "companyStatus": 1,
7 "subsidiaries": [
8 {
9 "companyId": 102,
10 "companyName": "Innovatech Solutions",
11 "companyStatus": 1,
12 "subsidiaries": [
13 {
14 "companyId": 104,
15 "companyName": "NextGen Software",
16 "companyStatus": 1,
17 "subsidiaries": [
18 {
19 "companyId": 105,
20 "companyName": "CloudNet Services",
21 "companyStatus": 1,
22 "subsidiaries": [
23 {
24 "companyId": 106,
25 "companyName": "DataStream Analytics",
26 "companyStatus": 1
27 }
28 ]
29 }
30 ]
31 }
32 ]
33 },
34 {
35 "companyId": 103,
36 "companyName": "EcoSmart Manufacturing",
37 "companyStatus": 1
38 }
39 ]
40 }
41 ],
42 "meta": {
43 "message": "SUCCESS",
44 "pagination": {
45 "totalCount": 2,
46 "limit": 10,
47 "offset": 0
48 }
49 }
50}

Get the complete hierarchy of current company, including its parent companies and subsidiaries. The API rate limit is 15 times/min per store.

Was this page helpful?
Previous

Attach Company as Parent to Current Company

Next

List Company Permissions

Built with

Authentication

authTokenstring

Required to authenticate requests. Include the token in a header parameter called authToken.

Path parameters

companyIdintegerRequired
ID of company.

Query parameters

offsetintegerOptionalDefaults to 0
Pagination offset.
limitintegerOptionalDefaults to 10
Pagination limit for subsidiaries of current company.

Response

OK
datalist of objects
metaobject

Errors

404
Not Found Error