# Lending & borrower monitoring

Bring financial statements and receivables into your own credit workflow.

For lending platforms and teams building underwriting data pipelines.

[API endpoints](https://developers.apideck.com/apis/accounting/reference?useCase=lending) · [Build this workflow](https://developers.apideck.com/guides/business-lending-accounting-api)

## What you can build

Read financial statements and receivables to feed your underwriting and monitoring models.

Workflow: Connect the borrower → Read financial evidence → Monitor changes

## Where your product takes over

Apideck supplies accounting data. Your product owns eligibility rules, underwriting decisions, due diligence, and funding. This workflow does not promise credit scoring or bank transaction enrichment.

## Collect a borrower’s accounting evidence

Build a read-only collection job before connecting the data to a credit model. Its output is a dated set of source records for one borrower and accounting company, with an explicit record of anything you could not retrieve.

Agree which company, reporting period and currency you need. Create a consumer for the borrower, authorize the accounting connection in Vault, and check coverage for each operation below. A successful invoice read does not establish that the connector supports financial reports.

### GET /accounting/company-info

[Operation reference](https://developers.apideck.com/apis/accounting/reference/company-info/companyInfoOne?useCase=lending)

Confirm the connected company before associating records with an application. Resolve a wrong-company selection before collecting more data.

### GET /accounting/profit-and-loss

[Operation reference](https://developers.apideck.com/apis/accounting/reference/profit-and-loss/profitAndLossOne?useCase=lending)

Read income and expense information for the required reporting window. Compare the returned period and currency with the request; do not assume the connector applied every filter.

### GET /accounting/balance-sheet

[Operation reference](https://developers.apideck.com/apis/accounting/reference/balance-sheet/balanceSheetOne?useCase=lending)

Read the position at the agreed reporting date. Keep this separate from period activity: a balance at a date and revenue over a period answer different questions.

### GET /accounting/invoices

[Operation reference](https://developers.apideck.com/apis/accounting/reference/invoices/invoicesAll?useCase=lending)

Collect receivables across every page using meta.cursors.next. Retain source invoice IDs and customer IDs. An empty first page is not proof that the business has no receivables.

### GET /accounting/aged-debtors

[Operation reference](https://developers.apideck.com/apis/accounting/reference/aged-debtors/agedDebtorsOne?useCase=lending)

Where supported, retrieve the provider’s receivables aging. If you derive aging from invoices instead, label it as your calculation and document how you handle dates, credits and missing balances.

### Do not confuse an invoice total with the amount still due

Illustrative excerpt from an invoice record, not a complete API response. Fields can be absent depending on the connector. Here the original invoice is USD 1,200, but only USD 300 remains outstanding.

```json
{
  "id": "invoice-example-1042",
  "customer": { "id": "customer-example-17" },
  "currency": "USD",
  "total": 1200,
  "balance": 300
}
```

Using total as outstanding receivables would overstate this record by USD 900. If balance is absent, keep it missing until you can establish the amount from supported source data; do not turn it into zero. Do not add amounts in different currencies without an explicit conversion policy. These checks validate your input data, not a borrower’s creditworthiness.

### Handle incomplete collections

- **Report operation is unavailable:** Mark that input as unavailable and record the connector and operation. Use a documented alternative only if it answers the same question; do not fabricate a report from an incomplete invoice list.
- **A later page fails or the connection expires:** Keep the collection incomplete. Retain the last complete snapshot, repair the connection or retry the read as appropriate, and finish pagination before publishing a replacement.
- **Reporting dates or company do not match:** Quarantine the result for review. Do not combine it with an earlier snapshot just because the request returned HTTP 200.
- **A repeat refresh changes older records:** Keep source identifiers and retrieval timestamps with each snapshot. Reconcile corrections and deletions; an updated-since filter, where supported, is not by itself a complete history of every change.

### Before publishing a snapshot

A collection is ready for downstream review when the company is confirmed, required operations have completed, all list pages are retrieved, report periods and currencies are checked, and missing inputs are explicit. Store your own retrieval timestamp and completion status alongside the source records. Keep incomplete refreshes distinguishable from the last successful collection.

## From connection to a working integration

### 1. Connect the borrower’s company

Use Vault for the borrower’s accounting connection. Verify the company and required read permissions before collecting financial inputs.

[Explore this step](https://developers.apideck.com/guides/vault)

### 2. Assemble underwriting inputs

Read supported financial statements, invoices, customers, and aged receivables. Store source identifiers, report periods, and retrieval timestamps with your model inputs.

[Explore this step](https://developers.apideck.com/guides/business-lending-accounting-api)

### 3. Monitor after origination

Schedule refreshes appropriate to your product. Paginate lists, use incremental filters where supported, and surface connection failures or gaps for review.

[Explore this step](https://developers.apideck.com/guides/syncing-accounting-data-at-scale)

## The API behind the workflow

Support, fields, and permissions vary by connector. Verify operation coverage and setup before implementation.

- [Profit and loss](https://developers.apideck.com/apis/accounting/reference/profit-and-loss?useCase=lending)
- [Invoices](https://developers.apideck.com/apis/accounting/reference/invoices?useCase=lending)
- [Customers](https://developers.apideck.com/apis/accounting/reference/customers?useCase=lending)

[Select a connector and plan implementation](https://developers.apideck.com/integration-plan?useCase=lending)

## Know when it works

- Financial inputs reconcile with the borrower’s company and agreed reporting period.
- Missing or stale data is routed for review rather than treated as a healthy signal.
- Reconnections and repeat refreshes preserve a traceable history of source evidence.

## Start building

- [Implementation guide](https://developers.apideck.com/guides/business-lending-accounting-api)
- [API endpoints](https://developers.apideck.com/apis/accounting/reference?useCase=lending)
- [Workflow context for your agent](https://developers.apideck.com/api/context/accounting/lending.md)
- [Explore the demo](https://lending.apideck.dev/)

The demo illustrates a product flow. Its data and connection setup depend on the demo; verify your target connector before implementation.
