myob-api-integration

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

MYOB API Integration Skill

MYOB API集成Skill

Provides read-only access to MYOB accounting data through the MYOB API. Extracts historical transactions, chart of accounts, contacts, and financial reports for tax analysis.
通过MYOB API提供对MYOB会计数据的只读访问权限。提取历史交易记录、会计科目表、联系人信息以及财务报告,用于税务分析。

When to Use

适用场景

  • Connecting a MYOB client for tax analysis (instead of Xero)
  • Extracting historical transaction data from MYOB
  • Fetching chart of accounts for GL mapping
  • Pulling profit & loss and balance sheet reports
  • Multi-year data sync for carry-forward analysis
  • 为税务分析连接MYOB客户(替代Xero)
  • 从MYOB提取历史交易数据
  • 获取会计科目表用于总账映射
  • 拉取利润表和资产负债表报告
  • 多年度数据同步用于结转分析

Integration Architecture

集成架构

MYOB API → myob-adapter.ts → canonical-schema.ts → analysis engines
All MYOB data is normalised to the canonical schema (
lib/integrations/canonical-schema.ts
) before being consumed by analysis engines. This ensures all 16 engines work identically regardless of whether data comes from Xero, MYOB, or QuickBooks.
MYOB API → myob-adapter.ts → canonical-schema.ts → analysis engines
所有MYOB数据在被分析引擎处理前,都会被标准化为规范模型(
lib/integrations/canonical-schema.ts
)。这确保了全部16个引擎无论数据来自Xero、MYOB还是QuickBooks,都能以相同方式运行。

Key Files

关键文件

  • Adapter:
    lib/integrations/adapters/myob-adapter.ts
    — MYOB API client
  • Historical Fetcher:
    lib/integrations/myob-historical-fetcher.ts
    — Multi-year data sync
  • Canonical Schema:
    lib/integrations/canonical-schema.ts
    — Normalised data model
  • Config:
    lib/integrations/myob-config.ts
    — OAuth configuration
  • Auth Route:
    app/api/auth/myob/route.ts
    — OAuth 2.0 callback
  • 适配器
    lib/integrations/adapters/myob-adapter.ts
    — MYOB API客户端
  • 历史数据获取器
    lib/integrations/myob-historical-fetcher.ts
    — 多年度数据同步
  • 规范模型
    lib/integrations/canonical-schema.ts
    — 标准化数据模型
  • 配置文件
    lib/integrations/myob-config.ts
    — OAuth配置
  • 认证路由
    app/api/auth/myob/route.ts
    — OAuth 2.0回调

Access Scopes

访问权限范围

All access is read-only:
  • General Ledger transactions
  • Chart of accounts
  • Contacts
  • Bank transactions
  • Payroll data (if available)
所有访问均为只读
  • 总账交易记录
  • 会计科目表
  • 联系人信息
  • 银行交易记录
  • 薪资数据(若可用)

Data Normalisation

数据标准化

MYOB FieldCanonical FieldNotes
UIDexternalIdMYOB unique identifier
DisplayIDreferenceAccount/transaction code
DatedateISO 8601
Total/AmountamountDecimal precision preserved
Account.DisplayIDaccountCodeGL account code
Contact.DisplayIDcontactIdContact reference
MYOB字段规范字段说明
UIDexternalIdMYOB唯一标识符
DisplayIDreference账户/交易代码
DatedateISO 8601格式
Total/Amountamount保留小数精度
Account.DisplayIDaccountCode总账账户代码
Contact.DisplayIDcontactId联系人参考编号

OAuth Flow

OAuth流程

  1. User clicks "Connect MYOB"
  2. Redirect to MYOB OAuth consent screen
  3. User grants read-only access
  4. Callback stores encrypted tokens
  5. Select company file (MYOB-specific)
  6. Begin historical data sync
  1. 用户点击"连接MYOB"
  2. 重定向至MYOB OAuth授权页面
  3. 用户授予只读访问权限
  4. 回调存储加密令牌
  5. 选择公司文件(MYOB特有)
  6. 开始历史数据同步