Infrastructure high complexity backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Supabase Edge Function layer that abstracts both the Xledger REST API and the Microsoft Dynamics OData API behind a common interface. Keeps all API credentials server-side, handles token management, and exposes unified endpoints consumed by the sync services. Prevents client-side exposure of ERP credentials.

Feature: Accounting System Integration

accounting-api-gateway

Responsibilities

  • Abstract Xledger and Dynamics API differences behind a common gateway interface
  • Manage OAuth2 and Azure AD token lifecycles entirely server-side
  • Forward requests to the correct upstream ERP based on connector type parameter
  • Enforce request signing and rate limiting for outbound ERP calls
  • Log raw API responses for debugging and audit purposes

Interfaces

postRecord(connectorType, payload, orgId)
getAuthToken(connectorType, orgId)
refreshToken(connectorType, orgId)
checkConnectorHealth(connectorType, orgId)
getRateLimitStatus(connectorType)
forwardRequest(connectorType, method, path, body)
handleUpstreamError(connectorType, error)

Related Data Entities (1)

Data entities managed by this component