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

# Get unit by reference

> Returns a single unit resolved by its reference value.



## OpenAPI

````yaml /openapi.yaml get /units/reference/{unit}
openapi: 3.0.0
info:
  title: Ziik API
  version: '1.0'
servers: []
security: []
tags:
  - name: Auth
    description: Auth
  - name: Posts
    description: Posts
  - name: Counters
    description: Counters
  - name: Groups
    description: Groups
  - name: Languages
    description: Languages
  - name: Timezones
    description: Timezones
  - name: Units
    description: Units
  - name: User unit memberships
    description: User unit memberships
  - name: Users
    description: Users
  - name: User types
    description: User types
  - name: Conversations
    description: Conversations
paths:
  /units/reference/{unit}:
    get:
      tags:
        - Units
      summary: Get unit by reference
      description: Returns a single unit resolved by its reference value.
      operationId: d4fff5a6a567edf95606c9522b1facde
      parameters:
        - name: unit
          in: path
          description: Unit identifier (ID or reference depending on route)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Unit details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unit'
        '404':
          description: Unit not found
components:
  schemas:
    Unit:
      properties:
        content_type:
          type: string
          example: unit
        id:
          type: integer
          example: 1
        reference:
          type: string
          nullable: true
        name:
          type: string
          example: HQ
        description:
          type: string
          nullable: true
        level:
          description: Depth in unit tree
          type: integer
        path:
          description: Materialized path
          type: string
        unit_type:
          type: string
          example: unit
        falldown:
          description: From pivot when in context
          type: boolean
          nullable: true
        features:
          type: array
          items:
            type: object
          nullable: true
        departments:
          type: array
          items:
            type: object
          nullable: true
        parent:
          description: Parent unit when loaded
          type: object
          nullable: true
        image:
          description: Unit image when loaded
          type: object
          nullable: true
        children:
          type: array
          items:
            type: object
          nullable: true
        addresses:
          description: Company, delivery, invoicing addresses
          type: object
        contact:
          description: Contact name and phone
          type: object
        opening_hours:
          description: Office hours and closed days
          type: object
        geo:
          properties:
            lat:
              type: number
              nullable: true
            lng:
              type: number
              nullable: true
          type: object
        stats:
          properties:
            users:
              type: integer
            children:
              type: integer
            children_total:
              type: integer
          type: object
          nullable: true
        permissions:
          description: Permission flags for current user
          type: object
        url:
          type: string
          example: api/units/1
      type: object

````