Service Layer high complexity backend
3
Dependencies
2
Dependents
2
Entities
0
Integrations

Description

Provider-agnostic adapter service implementing the accounting integration interface for both Xledger and Dynamics REST APIs. Abstracts provider-specific request serialization, authentication headers, and response parsing behind a common interface so additional accounting systems can be added without changing the sync layer.

Feature: Accounting API

accounting-api-integration-service

Responsibilities

  • Implement adapter pattern to normalize Xledger and Dynamics API differences
  • Serialize approved expense and reimbursement records into provider-specific payloads
  • Authenticate requests using org-specific credentials from integration_configs (encrypted)
  • Return normalized sync result including provider transaction reference
  • Validate accounting code mappings before dispatch

Interfaces

sendExpense(orgId, expenseId): SyncResult
getProvider(orgId): AccountingProvider
buildPayload(expense, mappings, provider): ProviderPayload
parseResponse(providerResponse): SyncResult
validateMapping(expenseTypeId, orgId): boolean

Related Data Entities (2)

Data entities managed by this component