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

# Get root department

> Returns the organization's root department — the top of its department hierarchy (`level` 0). Returns 403 when the organization does not exist or the authenticated user is not an administrator of it. Returns 404 when the organization has no valid root department configured.




## OpenAPI

````yaml /openapi/findity-admin-api.json get /organizations/{organizationId}/departments/root
openapi: 3.1.0
info:
  title: Findity Admin API
  description: Findity Admin API
  version: 1.0.0
servers:
  - url: https://stage-api.findity.com/api/v1/admin
  - url: https://api.findity.com/api/v1/admin
security:
  - bearerAuth: []
paths:
  /organizations/{organizationId}/departments/root:
    get:
      tags:
        - Departments
      summary: Get root department
      description: >
        Returns the organization's root department — the top of its department
        hierarchy (`level` 0). Returns 403 when the organization does not exist
        or the authenticated user is not an administrator of it. Returns 404
        when the organization has no valid root department configured.
      operationId: adminGetDepartmentsRoot
      parameters:
        - name: organizationId
          in: path
          required: true
          description: >
            String. The organization's internal ID (32-character hex string) or
            its `externalSourceId`. When the value matches the format of an
            internal ID, the internal ID takes precedence.
          schema:
            type: string
            example: 11adfe2a080040e3892ffb89c21ec44e
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminApiDepartment'
              example:
                id: 63b7a7802a644e8ca296c9796ffa7074
                externalSourceId: null
                name: Acme AB
                parentId: null
                vatType: USE_CATEGORY
                customDimensionPresetValues: []
                level: 0
        '403':
          description: Forbidden — organization not found or access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Error'
              examples:
                Organization not found or access denied:
                  value:
                    result: error
                    description: Organization not found or access denied
        '404':
          description: Not found — organization has no valid root department configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404Error'
              examples:
                Department not found:
                  value:
                    result: error
                    code: DEPARTMENT_NOT_FOUND
                    description: Department not found
components:
  schemas:
    AdminApiDepartment:
      type: object
      required:
        - id
        - externalSourceId
        - name
        - parentId
        - vatType
        - customDimensionPresetValues
        - level
      properties:
        id:
          type: string
          description: Unique identifier of the department.
        externalSourceId:
          type: string
          description: >-
            External source identifier of the department, if set by an
            integration. Null when not set.
          nullable: true
        name:
          type: string
          description: Display name of the department.
        parentId:
          type: string
          description: >
            The `id` of the parent department. Null only for the organization's
            own root unit (level 0). Every other department, including a
            top-level one directly under the root, has this set to its parent's
            id.
          nullable: true
        vatType:
          type: string
          description: >-
            VAT deduction handling for this department. Defaults to
            `USE_CATEGORY` when not explicitly set.
          enum:
            - USE_CATEGORY
            - NON_DEDUCTABLE_VAT
            - DEDUCTABLE_VAT
        customDimensionPresetValues:
          type: array
          description: >-
            Preset custom dimension values configured for this department.
            Excludes values belonging to deleted dimension definitions.
          items:
            $ref: '#/components/schemas/AdminApiCustomDimensionPresetValue'
        level:
          type: integer
          description: >
            Depth of the department within the organization's unit hierarchy.
            The organization's implicit root unit is level 0; a genuine
            top-level department is level 1.
    403Error:
      type: object
      properties:
        result:
          type: string
        description:
          type: string
      example:
        result: error
        description: Not allowed
    404Error:
      type: object
      properties:
        result:
          type: string
        code:
          type: string
        description:
          type: string
      example:
        result: error
        code: ORGANIZATION_NOT_FOUND
        description: 'Failed to get organization for id: {orgId}'
    AdminApiCustomDimensionPresetValue:
      type: object
      required:
        - id
        - dimensionDefinitionId
      properties:
        id:
          type: string
          description: Unique identifier of the preset value.
        dimensionDefinitionId:
          type: string
          description: >-
            The ID of the custom dimension definition this preset value belongs
            to.
        presetListValueId:
          type: string
          description: >-
            The ID of the selected list value, when the dimension uses a list of
            values. Null when a free-text preset is used instead.
          nullable: true
        presetListValueText:
          type: string
          description: >-
            Display text of the selected list value. Null when a free-text
            preset is used instead.
          nullable: true
        presetStringValue:
          type: string
          description: >-
            Free-text preset value, when the dimension does not use a list of
            values. Null when a list value is used instead.
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````