> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kibocommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Category Tree

> Retrieves the list of product categories that appear on the storefront organized in a hierarchical format. Hidden categories do not appear in the list.



## OpenAPI

````yaml /openapi/openapi_catalog_storefront.json get /commerce/catalog/storefront/categories/tree
openapi: 3.0.1
info:
  description: |-
    <div id="overview_CATALOG_STOREFRONT">
                <h2>CATALOG STOREFRONT</h2>
                <p>The Catalog Storefront APIs are a collection of resources for managing storefront categories, currencies, price lists, products, and
                    product search. This controls how the products in your catalog are organized and displayed on the
                    storefront. See the
                    <a href="/concept-guides/catalog">Catalog user guides</a>
                    for information about the related features in the Unified Commerce Admin.</p>
                <p>Use the <strong>Currencies</strong> resource to retrieve exchange rates for displaying prices on your storefront.</p>
                <p>Use the <strong>Storefront Categories</strong> resource to view the product category hierarchy as it appears to shoppers
                    who are browsing the storefront. The hierarchy can be returned as a flat list or as a category tree.</p>
                <p>Use the <strong>Pricelists</strong> resource to retrieve the details of a price list. The details may contain a hierarchy
                    of ancestor and/or descendant price lists dependening on your configuration.</p>
                <p>Use the <strong>Storefront Products</strong> resource to manage the shopper product selection process during a visit to
                    the web storefront. You can update product options as shoppers pick and choose their product choices. A
                    shopper cannot add a product to a cart until all of its required options have been selected.</p>
                <p>Use the <strong>Product Search</strong> resource to provide dynamic search results to shoppers as they browse and search
                    for products on the web storefront, and to suggest possible search terms as the shopper enters text. The related <strong>Search Redirect</strong>
                    resource allows you to retrieve any search redirect items.</p>
            </div>
  title: Catalog Storefront
  version: 0.0.1
servers:
  - description: Kibo Base URL
    url: '{baseUrl}/api'
    variables:
      baseUrl:
        default: https://t1000000.sb.usc1.gcp.kibocommerce.com
        description: Base URL
security:
  - bearerAuth: []
paths:
  /commerce/catalog/storefront/categories/tree:
    get:
      tags:
        - Categories
      summary: Get Category Tree
      description: >-
        Retrieves the list of product categories that appear on the storefront
        organized in a hierarchical format. Hidden categories do not appear in
        the list.
      parameters:
        - description: >-
            Optional. If True, Return Category Attributes collection with
            Category
          in: query
          name: includeAttributes
          schema:
            default: false
            type: boolean
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogRuntimesCategoryCollection'
            text/json:
              schema:
                $ref: '#/components/schemas/CatalogRuntimesCategoryCollection'
            text/plain:
              schema:
                $ref: '#/components/schemas/CatalogRuntimesCategoryCollection'
          description: OK
components:
  schemas:
    CatalogRuntimesCategoryCollection:
      description: Collection of categories returned as a whole. A collection is not paged.
      properties:
        items:
          items:
            $ref: '#/components/schemas/CatalogRuntimesCategory'
          nullable: true
          type: array
        totalCount:
          format: int32
          type: integer
      type: object
    CatalogRuntimesCategory:
      description: >-
        The category hierarchy of your store as it appears on the storefront.
        This is the category heirarchy defined with the admin/category resource
        except for any categories with an IsDisplayed value set to false.
      properties:
        attributes:
          items:
            $ref: '#/components/schemas/CatalogRuntimesCategoryAttribute'
          nullable: true
          type: array
        categoryCode:
          description: External unique identifier of the category.
          nullable: true
          type: string
        categoryId:
          description: >-
            Internal unique identifier of the category. System-supplied and
            read-only.
          format: int32
          type: integer
        childrenCategories:
          description: List of subcategories that belong to this category.
          items:
            type: object
          nullable: true
          type: array
        content:
          $ref: '#/components/schemas/CategoryContent'
        count:
          description: Indicates whether the category should be displayed.
          format: int32
          nullable: true
          type: integer
        isDisplayed:
          description: Indicates whether the category should be displayed.
          type: boolean
        parentCategory:
          type: object
        sequence:
          description: >-
            Order in which categories appear when they are at the same level
            (siblings). For example, categories can be sequenced so that a
            specific category always appears first (or last).
          format: int32
          nullable: true
          type: integer
        shouldSlice:
          description: Indicates whether the category should be sliced
          type: boolean
        updateDate:
          description: Last Modified Date Time
          format: date-time
          type: string
      type: object
    CatalogRuntimesCategoryAttribute:
      properties:
        dataType:
          format: int32
          type: integer
        fullyQualifiedName:
          nullable: true
          type: string
        values:
          items: {}
          nullable: true
          type: array
      type: object
    CategoryContent:
      description: >-
        Name of the category and optionally, a description, page title, friendly
        URL, associated images, and any metadata.
      properties:
        categoryImages:
          description: Images associated with the category.
          items:
            $ref: '#/components/schemas/CategoryImage'
          nullable: true
          type: array
        description:
          description: Description of the category as it appears on the storefront.
          nullable: true
          type: string
        metaTagDescription:
          description: >-
            Metadata description. Metadata can be used to manage information
            internally.
          nullable: true
          type: string
        metaTagKeywords:
          description: >-
            Metadata keywords. Metadata can be used to manage information
            internally.
          nullable: true
          type: string
        metaTagTitle:
          description: >-
            Metadata title. Metadata can be used to manage information
            internally.
          nullable: true
          type: string
        name:
          description: Name of the category as it appears on the storefront.
          nullable: true
          type: string
        pageTitle:
          description: Title that appears at the top of new pages.
          nullable: true
          type: string
        slug:
          description: >-
            Human-readable identifier given to the category to create friendly
            URLs.
          nullable: true
          type: string
      type: object
    CategoryImage:
      description: Image or video associated with a category.
      properties:
        altText:
          description: >-
            Descriptive text associated with the image. Unicode data with a
            maximum length of 200 characters.
          nullable: true
          type: string
        cmsId:
          description: Id of the image in the CMS.
          nullable: true
          type: string
        imageLabel:
          description: Image title.  Unicode data with a maximum length of 50 characters.
          nullable: true
          type: string
        imageUrl:
          description: Image URL. Unicode data with a maximum length of 4000 characters.
          nullable: true
          type: string
        mediaType:
          description: >-
            Type of media. Used by the client to determine how to render the
            image or video or what have you.
          nullable: true
          type: string
        sequence:
          description: >-
            For categories with multiple images, the sequence is the order in
            which this image appears. Whole number data. Required.
          format: int32
          nullable: true
          type: integer
        videoUrl:
          description: >-
            URL of the video. Unicode data with a maximum length of 4000
            characters.
          nullable: true
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````