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

Description

Pluggable service layer that abstracts communication with external accounting backends such as Xledger and Microsoft Dynamics. It translates internal expense and financial data into the format required by each backend and dispatches API calls on behalf of the platform. The abstraction ensures new accounting systems can be added without changing platform code.

Feature: Accounting API

accounting-api-client

Sources & reasoning

Line 72 documents explicit per-org accounting system requirements (Xledger and Dynamics) for HLF and Blindeforbundet. Line 354 places this under Fase 3, mapping to v1.1. The need for a shared API abstraction across two different accounting backends with org-specific credentials directly motivates this feature.

  • docs/source/likeperson.md · line 72
    API-integrasjon mot regnskapssystem (Xledger for Blindeforbundet, Dynamics-portal for HLF).
  • docs/source/likeperson.md · line 354
    Regnskapsintegrasjon (Xledger for Blindeforbundet, Dynamics accounting for HLF)

Responsibilities

  • Translate internal expense records into accounting-system-specific payloads
  • Dispatch authenticated HTTP requests to the configured accounting backend
  • Handle response parsing and error normalization across different backend APIs
  • Select the correct backend implementation based on organization configuration
  • Retry failed transmissions and surface actionable error messages

Interfaces

submitExpense(expense: ExpenseRecord, orgConfig: AccountingConfig): TransmissionResult
validateConnection(orgConfig: AccountingConfig): ConnectionStatus
getBackendAdapter(systemType: AccountingSystemType): AccountingAdapter
retryFailedTransmission(transmissionId: string): TransmissionResult