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
        • Brands
        • Categories
        • Category Trees
            • GETList Category Trees
            • PUTUpsert Category Trees
            • DELDelete Category Trees
            • GETGet Category Tree
        • Products
        • Product Modifiers
        • Product Variants
        • Product Variant Options
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminCatalogCategory Trees

Get Category Tree

GET
https://api.bigcommerce.com/stores/:store_hash/v3/catalog/trees/:tree_id/categories
GET
/stores/:store_hash/v3/catalog/trees/:tree_id/categories
$curl https://api.bigcommerce.com/stores/store_hash/v3/catalog/trees/1/categories \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json"
1{
2 "data": [
3 {
4 "id": 100,
5 "parent_id": 0,
6 "depth": 0,
7 "path": [
8 100
9 ],
10 "name": "Home & Garden",
11 "is_visible": true,
12 "children": [
13 {
14 "id": 101,
15 "parent_id": 100,
16 "depth": 1,
17 "path": [
18 100,
19 101
20 ],
21 "name": "Bathroom",
22 "is_visible": true,
23 "children": [
24 {
25 "id": 102,
26 "parent_id": 101,
27 "depth": 2,
28 "path": [
29 100,
30 101,
31 102
32 ],
33 "name": "Bath Towels",
34 "is_visible": true,
35 "children": [],
36 "url": "/bath/bath-towels/"
37 },
38 {
39 "id": 103,
40 "parent_id": 101,
41 "depth": 2,
42 "path": [
43 100,
44 101,
45 103
46 ],
47 "name": "Shower Curtains",
48 "is_visible": true,
49 "children": [],
50 "url": "/bath/shower-curtains/"
51 }
52 ],
53 "url": "/bath/"
54 },
55 {
56 "id": 104,
57 "parent_id": 100,
58 "depth": 1,
59 "path": [
60 100,
61 104
62 ],
63 "name": "Kitchen",
64 "is_visible": true,
65 "children": [],
66 "url": "/kitchen/"
67 }
68 ],
69 "url": "/home-garden/"
70 }
71 ],
72 "meta": {
73 "type": "object",
74 "properties": {},
75 "description": "Empty meta object; reserved for use later."
76 }
77}

Returns a category tree.

Note: The default rate limit for this endpoint is 1 concurrent request.

Was this page helpful?
Previous

Delete Category Trees

Next

List Categories

Built with

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Products | modify | `store_v2_products` | | Products | read-only | `store_v2_products_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

Path parameters

tree_idintegerRequired
The ID of the category tree.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Query parameters

depthintegerOptional
Max depth for a tree of categories.

Response

Categories tree
datalist of objects
metaobject
Response metadata.

Errors

403
Forbidden Error
404
Not Found Error

OAuth scopes

UI NamePermissionParameter
Productsmodifystore_v2_products
Productsread-onlystore_v2_products_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.