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

Description

Backend service exposing PATCH endpoints for approve, reject, and request-clarification actions on expense claims. Validates actor role and organizational scope, writes results to reimbursement_approvals with actor ID and timestamp, appends to audit_logs, and triggers notification dispatch.

Feature: Expense Approval Queue

expense-approval-service

Responsibilities

  • Validate requesting actor has coordinator or org-admin role with correct org/association scope
  • Apply approval, rejection, or clarification-request action to reimbursement_approvals record
  • Record actor ID, timestamp, and optional rejection reason on each action
  • Emit audit log entry for every approval action for compliance traceability
  • Trigger notification to expense submitter after each action

Interfaces

approveExpense(expenseId, actorId)
rejectExpense(expenseId, actorId, reason)
requestClarification(expenseId, actorId, message)
getExpenseQueue(filters, pagination, actorId)
getExpenseDetail(expenseId, actorId)
generateReceiptSignedUrl(receiptId, actorId)