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

# Get organisation tree

> Get the tree of organisations that the requested organisation is part of



## OpenAPI

````yaml /swagger/auth-api.json get /api/v1/{app_id}/organisations/{id}/tree
openapi: 3.0.0
info:
  contact:
    email: support@enad.io
    name: API support
    url: http://enad.io/support
  description: This is the documentation for Auth API v1
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://enad.io/terms/
  title: Public API
  version: '1.0'
servers:
  - url: //customers.enad.io
security: []
paths:
  /api/v1/{app_id}/organisations/{id}/tree:
    get:
      tags:
        - Organisations
      summary: Get organisation tree
      description: Get the tree of organisations that the requested organisation is part of
      parameters:
        - description: UUID of the app
          in: path
          name: app_id
          required: true
          schema:
            type: string
        - description: UUID of the organisation
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationTreeResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage
        '404':
          description: Organisation not found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage
      security:
        - BearerAuth: []
components:
  schemas:
    github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationTreeResponse:
      properties:
        ancestors:
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyNode
          type: array
        company_tree:
          $ref: >-
            #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrganisationTree
      type: object
    github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage:
      properties:
        details:
          items:
            type: string
          type: array
        message:
          type: string
        success:
          type: boolean
      type: object
    github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyNode:
      properties:
        app_id:
          type: string
        comment:
          type: string
        contact_name:
          type: string
        created_at:
          type: string
        credit_check:
          type: boolean
        custom_fields:
          additionalProperties:
            type: string
          type: object
        email:
          type: string
        external_ref:
          type: string
        id:
          type: string
        invoice_email:
          type: string
        name:
          type: string
        organisation_number:
          type: string
        parent_id:
          type: string
        phone:
          type: string
        status:
          type: string
        tax_id_vat_number:
          type: string
        updated_at:
          type: string
      type: object
    github_com_enadhq_koopa-key_internal_pkg_server_models.OrganisationTree:
      properties:
        app_id:
          type: string
        children:
          items:
            $ref: >-
              #/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrganisationTree
          type: array
        comment:
          type: string
        contact_name:
          type: string
        created_at:
          type: string
        credit_check:
          type: boolean
        custom_fields:
          additionalProperties:
            type: string
          type: object
        email:
          type: string
        external_ref:
          type: string
        id:
          type: string
        invoice_email:
          type: string
        name:
          type: string
        organisation_number:
          type: string
        parent_id:
          type: string
        phone:
          type: string
        status:
          type: string
        tax_id_vat_number:
          type: string
        updated_at:
          type: string
      type: object

````