{
/* ── Core identifiers ─────────────────────────────────────────── */
"actionId": "act_9f8e7d",
"type": "plaid_link", // plaid_link | statement_upload
"status": "completed", // accepted | processing | completed | errored
"metadata": { // ← echoed from widget init
"userId": "usr_789",
"loanAppId": "loan_456"
},
/* ── Normalized outputs ───────────────────────────────────────── */
"accounts": [ // Plaid or PDF-parsed
{
"accountId": "acc_123",
"name": "Business Checking",
"mask": "6789",
"type": "depository",
"subtype": "checking",
"currentBalance": 22450.73,
"availableBalance":20123.11,
"institution": "Chase",
"currency": "USD"
}
],
"transactions": [ // Unified schema
{
"txId": "tx_abc",
"accountId": "acc_123",
"date": "2025-04-15",
"description": "Stripe Payout",
"amount": -1520.00,
"category": "Deposits",
"currency": "USD",
"source": "plaid" // plaid | statement
}
],
"statements": [ // Present only if statement_upload
{
"statementId": "stmt_456",
"accountId": "acc_123",
"periodStart": "2025-04-01",
"periodEnd": "2025-04-30",
"pages": 4,
"validated": true, // ex: period matches Apr-25
"validationMessage": "", // or reason if false
"fileUrl": "https://files.getomni.ai/stmts/stmt_456.pdf"
}
],
/* ── Plaid connection details ─────────────────────────────────── */
"plaid": { // Present only if plaid_link
"itemId": "item_dev_abc",
"accessToken": "plaid-sandbox-xzy…", // store securely
"institution": {
"id": "ins_3",
"name": "Chase"
},
"requestId": "plaid-req-789",
"raw": { /* full Plaid /transactions/get response */ }
},
/* ── Error collection ─────────────────────────────────────────── */
"errors": [ // Always present (may be empty)
{
"code": "PDF_VALIDATION_FAILED",
"message": "Statement period does not include Apr 2025",
"field": "statements[0]"
}
],
/* ── Timestamps ───────────────────────────────────────────────── */
"createdAt": "2025-06-22T23:08:16Z",
"completedAt":"2025-06-22T23:08:42Z"
}