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

# Get company ownership hierarchy (tree)

> Returns a nested ownership tree built from the `CompanyOwnershipEdge` staging table. Combines ownership from multiple sources (annual reports, SCB, board minutes) with their metadata. Suitable for tree-style UI components.

<Badge color="purple" size="sm">Max+ tier</Badge>


## OpenAPI

````yaml get /companies/{id}/ownership-tree
openapi: 3.1.1
info:
  title: TIC Lens API
  description: "The TIC Lens API provides programmatic access to company, person, property, vehicle, and order data.\r\n\r\n## Authentication\r\n\r\nAll requests require an API key passed via the `x-api-key` header:\r\n\r\n```bash\r\ncurl -H \"x-api-key: YOUR_API_KEY\" https://lens-api.tic.io/companies/123\r\n```\r\n\r\nAPI keys are managed through the TIC Lens web application under **Settings → API Keys**.\r\n\r\n## Base URL\r\n\r\n| Environment | URL |\r\n|-------------|-----|\r\n| Production  | `https://lens-api.tic.io` |\r\n\r\n## Feature Access\r\n\r\nEndpoints are gated by your subscription plan. If your plan does not include a feature, the endpoint will return `403 Forbidden`.\r\n\r\n## Rate Limits\r\n\r\nRate limits are applied per API key. If you exceed the limit, requests will return `429 Too Many Requests`.\r\n\r\n## Response Format\r\n\r\nAll responses are JSON. Null values are omitted from responses.\r\n"
  version: v1
servers:
  - url: https://lens-api.tic.io
security:
  - ApiKey: []
tags:
  - name: Addresses
  - name: Bolagsverket
  - name: Brf
  - name: Companies
  - name: Documents
  - name: FlightImages
  - name: Free
  - name: Orders
  - name: OrdersExports
  - name: PaymentControl
  - name: PaymentControlImport
  - name: Persons
  - name: Properties
  - name: PublicSearch
  - name: SearchAutocomplete
  - name: Sentinel
  - name: ServingPermits
  - name: Team
  - name: Teams
  - name: Transportstyrelsen
  - name: Vehicles
  - name: WatchList
paths:
  /companies/{id}/ownership-tree:
    get:
      tags:
        - Companies
      summary: Get company ownership hierarchy (tree)
      description: >-
        Returns a nested ownership tree built from the `CompanyOwnershipEdge`
        staging table. Combines ownership from multiple sources (annual reports,
        SCB, board minutes) with their metadata. Suitable for tree-style UI
        components.
      operationId: GetCompanyOwnershipTree
      parameters:
        - name: id
          in: path
          description: Internal company ID
          required: true
          schema:
            type: integer
            format: int32
        - name: direction
          in: query
          description: >-
            Direction of traversal: "up" (owners/ancestors), "down"
            (subsidiaries/owned), or "both". Default "down".
          schema:
            type: string
            default: down
        - name: maxDepth
          in: query
          description: Maximum traversal depth. Default 10.
          schema:
            type: integer
            format: int32
            default: 10
        - name: currentOnly
          in: query
          description: >-
            When true, only current (non-historical) ownership edges are
            included. Default true.
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Ownership tree rooted at the company
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Ormeo_Library_Dtos_CompanyOwnershipTree_Dto
        '404':
          description: Company not found or not accessible
components:
  schemas:
    Ormeo_Library_Dtos_CompanyOwnershipTree_Dto:
      type: object
      properties:
        companyId:
          type:
            - 'null'
            - integer
          format: int32
        placeholderId:
          type:
            - 'null'
            - string
          format: uuid
        name:
          type:
            - 'null'
            - string
        registrationNumber:
          type:
            - 'null'
            - string
        countryCode:
          type:
            - 'null'
            - string
        isPlaceholder:
          type: boolean
        isSelected:
          type: boolean
        ownershipPercentage:
          type:
            - 'null'
            - number
          format: double
        numberOfShares:
          type:
            - 'null'
            - integer
          format: int32
        sources:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/Ormeo_Library_Dtos_OwnershipSourceInfo_Dto'
        children:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/Ormeo_Library_Dtos_CompanyOwnershipTree_Dto'
        parents:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/Ormeo_Library_Dtos_CompanyOwnershipTree_Dto'
        beneficialOwners:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/Ormeo_Library_Dtos_BeneficialOwnerNode_Dto'
        depth:
          type: integer
          format: int32
      additionalProperties: false
    Ormeo_Library_Dtos_OwnershipSourceInfo_Dto:
      type: object
      properties:
        source:
          type:
            - 'null'
            - string
        percentage:
          type:
            - 'null'
            - number
          format: double
        numberOfShares:
          type:
            - 'null'
            - integer
          format: int32
        numberOfVotes:
          type:
            - 'null'
            - integer
          format: int32
        shareClass:
          type:
            - 'null'
            - string
        asOfDate:
          type:
            - 'null'
            - string
          format: date-time
        validFrom:
          type:
            - 'null'
            - string
          format: date-time
        validTo:
          type:
            - 'null'
            - string
          format: date-time
        isCurrent:
          type: boolean
      additionalProperties: false
    Ormeo_Library_Dtos_BeneficialOwnerNode_Dto:
      type: object
      properties:
        personId:
          type:
            - 'null'
            - integer
          format: int32
        placeholderId:
          type:
            - 'null'
            - string
          format: uuid
        name:
          type:
            - 'null'
            - string
        personalIdentityNumber:
          type:
            - 'null'
            - string
        citizenshipCountryCode:
          type:
            - 'null'
            - string
        countryOfResidenceCode:
          type:
            - 'null'
            - string
        isPlaceholder:
          type: boolean
        extentCode:
          type:
            - 'null'
            - string
        extentDescription:
          type:
            - 'null'
            - string
        governCode:
          type:
            - 'null'
            - string
        governDescription:
          type:
            - 'null'
            - string
        intermediaryCompanyId:
          type:
            - 'null'
            - integer
          format: int32
        intermediaryCompanyName:
          type:
            - 'null'
            - string
        validFrom:
          type:
            - 'null'
            - string
          format: date-time
        validTo:
          type:
            - 'null'
            - string
          format: date-time
        isCurrent:
          type: boolean
        source:
          type:
            - 'null'
            - string
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: apiKey
      name: x-api-key
      in: header

````