# GetUoMCategory

## Overview

GetUoMCategory retrieves a single UoM category by its unique identifier or name. Returns the category record if found, or null if no matching category exists.

This function supports category validation and lookup operations for unit management workflows.

## Business Rules

- Lookup by `id` performs an exact UUID match
- Lookup by `name` performs an exact string match (e.g., "Weight", "Volume", "Length")
- Returns the full category record including status, description, and reference unit ID
- Does not filter by active status - returns both active and inactive categories
- Exactly one lookup key must be provided (id or name)

## Process Flow

```mermaid
flowchart TD
    A[Receive lookup request] --> B{Lookup by id or name?}
    B -->|id| C[Query UoMCategory by id]
    B -->|name| D[Query UoMCategory by name]
    C --> E{Found?}
    D --> E
    E -->|Yes| F[Return category]
    E -->|No| G[Return null]
```

## External Dependencies

- None

## Error Scenarios

- None (returns null when not found instead of throwing)

## Test Cases

- returns category when found
- returns null when category not found
- returns category when found
- returns null when category not found
