Service Layer medium complexity backend
2
Dependencies
1
Dependents
4
Entities
0
Integrations

Description

Backend REST service that exposes the active expense type configuration for the authenticated user's organization, including mutual exclusivity rules and auto-approval thresholds. Re-validates submitted expense type combinations server-side to prevent API bypass.

Feature: Expense Types & Requirements

expense-validation-service

Responsibilities

  • Return active expense type list with metadata (receipt required, thresholds, exclusivity groups) per organization
  • Validate expense type combination on claim submission and reject invalid states
  • Apply auto-approval logic based on configured thresholds per type
  • Serve config as cacheable response for offline use via Drift

Interfaces

GET /api/v1/expense-types → ExpenseTypeConfig[]
POST /api/v1/expense-claims/validate → ValidationResult
validateCombination(typeIds: string[]) → ValidationResult
getThresholdForType(typeId: string) → number

Relationships

Dependencies (2)

Components this component depends on

Dependents (1)

Components that depend on this component