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

# Get hierarchy tree by hierarchy id

> Returns the entire hierarchy tree from the specified hierarchy identifier up to the root level



## OpenAPI

````yaml openapi/product-catalog-v1.json GET /v1/Hierarchies/{hierarchyId}
openapi: 3.0.4
info:
  title: ProductCatalog.Api 1.0
  version: '1.0'
servers:
  - url: https://{host}/product-catalog
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security: []
paths:
  /v1/Hierarchies/{hierarchyId}:
    get:
      tags:
        - Hierarchies
      summary: Get hierarchy tree by hierarchy id
      description: >-
        Returns the entire hierarchy tree from the specified hierarchy
        identifier up to the root level
      parameters:
        - name: hierarchyId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Common.HierarchyTree
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Common.HierarchyTree
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Common.HierarchyTree
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.API.Infrastructure.Common.Errors.DomainError
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.API.Infrastructure.Common.Errors.DomainError
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.API.Infrastructure.Common.Errors.DomainError
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.API.Infrastructure.Common.Errors.DomainError
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.API.Infrastructure.Common.Errors.DomainError
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.API.Infrastructure.Common.Errors.DomainError
components:
  schemas:
    ProductCatalog.Contracts.Common.HierarchyTree:
      type: object
      properties:
        name:
          type: string
          description: Name of the hierarchy node
        id:
          type: string
          description: Id of the hierarchy node
        parentId:
          type: string
          description: Id of the parent hierarchy node
          nullable: true
        imageLink:
          type: string
          description: Image link of the hierarchy node
          nullable: true
        depth:
          type: integer
          description: Depth of the hierarchy node in the tree
          format: int32
      additionalProperties: false
    ProductCatalog.API.Infrastructure.Common.Errors.DomainError:
      type: object
      properties:
        errorType:
          $ref: >-
            #/components/schemas/ProductCatalog.API.Infrastructure.Common.Errors.ErrorType
        error:
          $ref: '#/components/schemas/LoopFoundation.Commons.Error'
      additionalProperties: false
      description: Domain handled error.
    ProductCatalog.API.Infrastructure.Common.Errors.ErrorType:
      enum:
        - NotFound
        - BadRequest
      type: string
    LoopFoundation.Commons.Error:
      type: object
      properties:
        name:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
        details:
          nullable: true
      additionalProperties: false

````