> ## 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 the company's group structure

> Returns every member of the company's group with its immediate parent, level, and the source and date behind the parent. A flat list: build the tree from `parentKey`. Without asOf it also lists the companies the registry put outside the group in the last 12 months (formerMembers) and the groups the company itself left (previousGroups).

Enterprise+ tier

Returns the group the company belongs to: every member, each with one immediate parent, its level and the source and date behind that parent. Where the [ownership tree](/api-lens/companies/get-company-ownership-hierarchy-tree) shows every ownership link found in any source, this endpoint gives one placement per company, decided by fixed rules.

The members come as a flat list. Build the tree from `parentKey`: the member whose `parentKey` is null is the ultimate parent, and `path` lists the keys from the ultimate parent down to the requested company. A company that belongs to no group returns `isInGroup: false` and an empty `members` list.

`asOf` (`yyyy-MM-dd`) returns the group as it was on that date. History is available from October 2026.

## Response

| Field | Description |
| - | - |
| `isInGroup` | False when the company belongs to no group on the date |
| `membershipAsOf` | When the registry last confirmed the company's group membership |
| `companyKey` | The requested company's key |
| `ultimateParentKey` | The ultimate parent's key |
| `memberCount` | All members, the ultimate parent included |
| `swedishMemberCount`, `foreignMemberCount` | Members registered in Sweden and elsewhere |
| `levels` | The deepest known level |
| `path` | Keys from the ultimate parent down to the company |
| `members` | Every member of the group |
| `formerMembers` | Companies the registry put outside the group in the last 12 months, newest first; see below. Without `asOf` only |
| `previousGroups` | The groups the requested company itself left in the last 12 months, in the same shape. Without `asOf` only |

## Members

| Field | Description |
| - | - |
| `key` | The member's key within the response |
| `companyId` | The internal company ID, when the member is a company in the register |
| `name` | The company's name |
| `registrationNumber` | The organisation number; null for a foreign member |
| `countryCode` | ISO country code, when known |
| `leiCode` | The member's LEI, when it has one |
| `level` | 1 for the ultimate parent, 2 directly below it, and so on; null when the position is not known |
| `parentKey` | The immediate parent's key; null for the ultimate parent |
| `childCount` | Members directly below this one |
| `positionKnown` | False when only the ultimate parent is known |
| `parentSource` | Where the immediate parent comes from, see below |
| `parentAsOf` | The date that source describes |
| `sourceCount` | How many independent sources name the same parent |
| `ownershipPercentage` | The share (0-100) the immediate parent holds in the member; null when unknown |
| `ownershipSource` | Where the share comes from (`registry`, `lei` or `other`); null when unknown |
| `ownershipAsOf` | The date the share's source describes |
| `isForeign` | True for a member registered outside Sweden |
| `isAggregate` | True for an entry that stands for the group's remaining companies rather than one company |

## Former members

`formerMembers` lists the companies the registry has taken out of the group in the last 12 months. That can mean a company was sold or merged into another company, or that the registry no longer holds its group membership. A company that is a member now is never listed. When the ultimate parent of an earlier group is now itself part of this group, the companies that left that earlier group are listed here too. For a company that belongs to no group, `formerMembers` lists the companies that left the group it led.

| Field | Description |
| - | - |
| `companyId` | The internal company ID, when the company is in the register |
| `registrationNumber` | The organisation number |
| `name` | The company's name |
| `leftOn` | The first day the registry put the company outside the group |
| `leftGroup` | The ultimate parent of the group it left: `companyId`, `registrationNumber` (null when foreign) and `name` |
| `nowInGroup` | The ultimate parent of the group it belongs to now, in the same shape; null when it belongs to none |

## Sources

| `parentSource` | Meaning |
| - | - |
| `registry` | The official business register |
| `lei` | The parent relationships in the global LEI register |
| `other` | Other sources |

Group membership and the ultimate parent always come from the registry. The immediate parent is the most recent placement that agrees with the current membership. When no source places a member, it hangs directly under the ultimate parent with `positionKnown: false` and `level: null`; members below it then have no level either.

The ownership share is given only when a source states it for that same parent, with its own source and date. Otherwise `ownershipPercentage` is null: the share is unknown, not zero.

## Example

```json theme={null}
{
  "isInGroup": true,
  "membershipAsOf": "2026-10-16T00:00:00",
  "companyKey": "0:5560000002",
  "ultimateParentKey": "0:5560000001",
  "memberCount": 3,
  "swedishMemberCount": 2,
  "foreignMemberCount": 1,
  "levels": 3,
  "path": ["0:5560000001", "0:5560000002"],
  "members": [
    { "key": "0:5560000001", "companyId": 101, "name": "Example Group AB", "registrationNumber": "5560000001", "countryCode": "SE", "level": 1, "parentKey": null, "childCount": 1, "positionKnown": true, "parentSource": null, "isForeign": false },
    { "key": "0:5560000002", "companyId": 102, "name": "Example Holding AB", "registrationNumber": "5560000002", "countryCode": "SE", "level": 2, "parentKey": "0:5560000001", "childCount": 1, "positionKnown": true, "parentSource": "registry", "parentAsOf": "2026-05-31T00:00:00", "sourceCount": 2, "ownershipPercentage": 100.0, "ownershipSource": "other", "ownershipAsOf": "2024-06-20T00:00:00", "isForeign": false },
    { "key": "1:163300000003", "companyId": null, "name": "Example GmbH", "registrationNumber": null, "countryCode": "DE", "level": 3, "parentKey": "0:5560000002", "childCount": 0, "positionKnown": true, "parentSource": "registry", "parentAsOf": "2026-05-31T00:00:00", "sourceCount": 1, "ownershipPercentage": null, "ownershipSource": null, "ownershipAsOf": null, "isForeign": true }
  ],
  "formerMembers": [
    { "companyId": 104, "registrationNumber": "5560000004", "name": "Example Sales AB", "leftOn": "2026-03-30T00:00:00", "leftGroup": { "companyId": 101, "registrationNumber": "5560000001", "name": "Example Group AB" }, "nowInGroup": null }
  ],
  "previousGroups": []
}
```


## OpenAPI

````yaml get /companies/{id}/group
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: CompanyReports
  - name: Documents
  - name: FlightImages
  - name: Free
  - name: Orders
  - name: OrdersExports
  - name: PaymentControl
  - name: PaymentControlImport
  - name: Persons
  - name: Properties
  - name: PublicSearch
  - name: Screening
  - name: SearchAutocomplete
  - name: Sentinel
  - name: ServingPermits
  - name: Team
  - name: Teams
  - name: Vehicles
  - name: WatchList
paths:
  /companies/{id}/group:
    get:
      tags:
        - Companies
      summary: Get the company's group structure
      description: >-
        Returns every member of the company's group with its immediate parent,
        level, and the source and date behind the parent. A flat list: build the
        tree from `parentKey`. Without asOf it also lists the companies the
        registry put outside the group in the last 12 months (formerMembers) and
        the groups the company itself left (previousGroups).
      operationId: GetCompanyGroup
      parameters:
        - name: id
          in: path
          description: Internal company ID
          required: true
          schema:
            type: integer
            format: int32
        - name: asOf
          in: query
          description: The group as it was on this date (yyyy-MM-dd). Default today.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: The company's group; isInGroup is false when it belongs to none
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ormeo_Library_Dtos_CompanyGroup_Dto'
        '404':
          description: Company not found or not accessible
components:
  schemas:
    Ormeo_Library_Dtos_CompanyGroup_Dto:
      type: object
      properties:
        isInGroup:
          type: boolean
        membershipAsOf:
          type:
            - 'null'
            - string
          format: date-time
        companyKey:
          type:
            - 'null'
            - string
        ultimateParentKey:
          type:
            - 'null'
            - string
        memberCount:
          type: integer
          format: int32
        swedishMemberCount:
          type: integer
          format: int32
        foreignMemberCount:
          type: integer
          format: int32
        levels:
          type:
            - 'null'
            - integer
          format: int32
        path:
          type:
            - 'null'
            - array
          items:
            type: string
        members:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/Ormeo_Library_Dtos_CompanyGroupMember_Dto'
        formerMembers:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/Ormeo_Library_Dtos_CompanyGroupLeaver_Dto'
        previousGroups:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/Ormeo_Library_Dtos_CompanyGroupLeaver_Dto'
      additionalProperties: false
    Ormeo_Library_Dtos_CompanyGroupMember_Dto:
      type: object
      properties:
        key:
          type:
            - 'null'
            - string
        companyId:
          type:
            - 'null'
            - integer
          format: int32
        name:
          type:
            - 'null'
            - string
        registrationNumber:
          type:
            - 'null'
            - string
        countryCode:
          type:
            - 'null'
            - string
        leiCode:
          type:
            - 'null'
            - string
        level:
          type:
            - 'null'
            - integer
          format: int32
        parentKey:
          type:
            - 'null'
            - string
        childCount:
          type: integer
          format: int32
        positionKnown:
          type: boolean
        parentSource:
          type:
            - 'null'
            - string
        parentAsOf:
          type:
            - 'null'
            - string
          format: date-time
        sourceCount:
          type:
            - 'null'
            - integer
          format: int32
        ownershipPercentage:
          type:
            - 'null'
            - number
          format: double
        ownershipSource:
          type:
            - 'null'
            - string
        ownershipAsOf:
          type:
            - 'null'
            - string
          format: date-time
        isForeign:
          type: boolean
        isAggregate:
          type: boolean
      additionalProperties: false
    Ormeo_Library_Dtos_CompanyGroupLeaver_Dto:
      type: object
      properties:
        companyId:
          type:
            - 'null'
            - integer
          format: int32
        registrationNumber:
          type:
            - 'null'
            - string
        name:
          type:
            - 'null'
            - string
        leftOn:
          type: string
          format: date-time
        leftGroup:
          $ref: '#/components/schemas/Ormeo_Library_Dtos_CompanyGroupRef_Dto'
        nowInGroup:
          $ref: '#/components/schemas/Ormeo_Library_Dtos_CompanyGroupRef_Dto'
      additionalProperties: false
    Ormeo_Library_Dtos_CompanyGroupRef_Dto:
      type: object
      properties:
        companyId:
          type:
            - 'null'
            - integer
          format: int32
        registrationNumber:
          type:
            - 'null'
            - string
        name:
          type:
            - 'null'
            - string
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: apiKey
      name: x-api-key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.