BizKitHub
DokumentacePrůzkumník APIProduct Category/api/v1/product-category/tree
getProduct CategoryVeřejné API v1

/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.

productCategorygetApiV1Product-categoryTree

Parametry

2 v query

Parametry v query

· 2
apiKeystringPovinné

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

PříkladPRODPGrFxpGEtrOZfuWhnoJohUYBXuOE
maxDepthstring | integerVolitelné

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: [].

Rozsah: 1–10Výchozí: 2
Příklad2

Schéma odpovědi

1 zdokumentovaný stavový kód

200ÚspěchProduct category tree.
itemsobject[]Povinné

Root categories with nested descendants up to maxDepth levels.

Každá položka pole:
idstringPovinné

Category code (unique identifier).

Příkladcat_lighting
namestringPovinné

Display name of the category.

PříkladLighting
slugstringPovinné

URL-friendly slug.

Příkladlighting
descriptionstringVolitelné

HTML description formatted for frontend display (only present when filled in admin).

b2bbooleanPovinné

Whether the category is B2B-only.

childrenany[]Povinné

Direct child categories. Always present as an array (empty when no children or at maxDepth).

Ukázka odpovědi

application/json
{
  "items": [
    {
      "id": "cat_lighting",
      "name": "Lighting",
      "slug": "lighting",
      "description": "example_description",
      "b2b": false,
      "children": []
    }
  ]
}

Ukázka požadavku

GET /api/v1/product-category/tree

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

Potřebujete API klíč?

Všechny veřejné endpointy BizKitHub API se ověřují API klíčem.

Získat API klíč