DocsInteractive API Docs/api/v1/product-category/tree
get

/api/v1/product-category/tree

Returns the full category tree for the organisation in a single call, suitable for rendering navigation menus during server-side rendering. Root categories appear in items; their descendants are nested under children up to maxDepth levels deep. Deleted, inactive, and internal categories are excluded. Within each level items are ordered by position.

Endpoint Info
Base URLapi.bizkithub.com
AuthBearer Token
Methods1
Authentication Required

This endpoint requires a valid API key passed as a query parameter or Bearer token.

Get your API key

Parameters

2 query parameters

apiKeystringrequired

Your BizKitHub API key (passed as GET parameter).

Key format: A 32-character string matching: ^(PROD|DEV_|ROOT)[A-Za-z0-9]{28}$
Prefixes: PROD (production key), DEV_ (individual developer), ROOT (system key with no limits). Learn more

maxDepthstring | integer

Maximum tree depth, counted inclusively from the root. 1 returns only roots, 2 returns roots and their direct children (default), up to 10. Nodes at the maximum depth always have children: [].

Default: 2

Example Request

JavaScript fetch

const response = await fetch("https://api.bizkithub.com/api/v1/product-category/tree?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE&maxDepth=2", {
  method: "GET",
  headers: {
    "Content-Type": "application/json"
  }
});

const data = await response.json();
console.log(data);
get

Example Response

200Success
{
  "items": [
    {
      "id": "cat_lighting",
      "name": "Lighting",
      "slug": "lighting",
      "description": "example_description",
      "b2b": false,
      "children": []
    }
  ]
}

cURL

Command line example

curl -X GET "https://api.bizkithub.com/api/v1/product-category/tree?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE&maxDepth=2" \
  -H "Content-Type: application/json"

Need an API key?

All BizKitHub API endpoints require authentication via API key.

Get API Key