> ## 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 department

> Returns a single department by its ID. Returns 403 when the organization does not exist or the authenticated user is not an administrator of it. Returns 404 when the department does not exist or belongs to a different organization.




## OpenAPI

````yaml /openapi/findity-admin-api.json get /organizations/{organizationId}/departments/{departmentId}
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/{departmentId}:
    get:
      tags:
        - Departments
      summary: Get department
      description: >
        Returns a single department by its ID. Returns 403 when the organization
        does not exist or the authenticated user is not an administrator of it.
        Returns 404 when the department does not exist or belongs to a different
        organization.
      operationId: adminGetDepartment
      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
        - name: departmentId
          in: path
          required: true
          description: >
            String. The ID of the department to retrieve (32-character hex
            string), as returned in the `id` field of the response. Lookup by
            `externalSourceId` is not supported for departments, unlike
            `organizationId`. The literal value `root` is reserved: `GET
            .../departments/root` always resolves to the organization's root
            department (see the Get departments root endpoint), so a department
            whose own `id` happens to be `root` cannot be retrieved through this
            endpoint.
          schema:
            type: string
            example: 9360d03ad7294220868d67f42a2a144d
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminApiDepartment'
              example:
                id: 9360d03ad7294220868d67f42a2a144d
                externalSourceId: SAP-4711
                name: Marketing
                parentId: 63b7a7802a644e8ca296c9796ffa7074
                vatType: USE_CATEGORY
                customDimensionPresetValues:
                  - id: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
                    dimensionDefinitionId: VAT25
                    presetListValueId: VAT25
                    presetListValueText: 25%
                    presetStringValue: null
                level: 1
        '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 — department does not exist
          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

````