> ## Documentation Index
> Fetch the complete documentation index at: https://endclose.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reconciliations

> Learn how an End Close reconciliation matches two sides of data streams, how continuous and batch runs work, and where adjustments live.

A reconciliation in End Close compares two sides of financial data and matches the records that belong together, for example Stripe payouts on Side A against bank deposits on Side B. Each side is one or more [data streams](https://endclose.com/docs/concepts/data-streams.md), and [rules](https://endclose.com/docs/concepts/rules-and-matches.md) decide which records match.

## How a reconciliation fits with the other concepts

* **Sides.** Side A and Side B each hold one or more [data streams](https://endclose.com/docs/concepts/data-streams.md). Every [record](https://endclose.com/docs/concepts/records.md) on those streams is a line in the reconciliation.
* **Rules.** A reconciliation's [rules](https://endclose.com/docs/concepts/rules-and-matches.md) run in priority order and group records into matches.
* **Matches.** A match holds records from both sides that account for each other. People can also match records by hand.
* **Exceptions.** Unmatched lines that pass their `overdue_at` roll up into an [exception](https://endclose.com/docs/concepts/exceptions.md) per data stream.
* **Agents.** End Close's reconciliation agent writes and refines rules, and [agents](https://endclose.com/docs/concepts/agents.md) investigate exceptions.

A stream can belong to several reconciliations. A record's match status is tracked per reconciliation, so the same bank line can be matched in one and still open in another.

## Reconciliation fields

| Field | Description |
| - | - |
| `id` | The reconciliation's identifier. |
| `name` | A human-readable name. |
| `run_type` | `continuous` (the default) or `batch`. See below. |
| `escalation_delay_days` | Days after its date that an unmatched record counts as overdue and becomes part of an [exception](https://endclose.com/docs/concepts/exceptions.md). `null` means never. A whole number from 0 to 365. |
| `side_a_streams` | The data streams on Side A. |
| `side_b_streams` | The data streams on Side B. |
| `manual_match_approval` | `true` to hold every manual match for a second person to approve. See [Approvals](#approvals). |
| `approval_limit_cents` | The amount, in cents, above which approving a match takes an admin, or `null` for no limit. See [Approvals](#approvals). |
| `current_run` | The batch run that is pending or running, if any. |
| `last_run` | The most recent batch run that completed or failed, if any. |

```json Reconciliation theme={"dark"}
{
  "id": "0193a7c4-2b8d-7e10-a3f5-91c04d6e8a21",
  "name": "Stripe payouts to Chase operating",
  "run_type": "batch",
  "escalation_delay_days": 5,
  "side_a_streams": [
    { "id": "0193a7c2-5e1f-7b2a-9c41-6d8e2f1a3b40", "key": "stripe_payouts", "name": "Stripe Payouts", "type": "stripe" }
  ],
  "side_b_streams": [
    { "id": "0193a7c3-0a4e-7c55-8d12-3f7b9e0c6d55", "key": "chase_operating", "name": "Chase Operating", "type": "bank_feed" }
  ],
  "manual_match_approval": true,
  "approval_limit_cents": 1000000,
  "created_at": "2026-10-02T14:11:09Z",
  "current_run": null,
  "last_run": {
    "id": "0193b1e0-77c2-7d0a-b6e4-2c9f8a1d5e03",
    "kind": "batch",
    "status": "completed",
    "trigger": "manual",
    "total_records": 4210,
    "matched_records": 4188,
    "progress": 100,
    "started_at": "2026-11-09T08:00:04Z",
    "completed_at": "2026-11-09T08:01:37Z"
  }
}
```

Create one with `POST /reconciliations`, passing `side_a_stream_ids` and `side_b_stream_ids`.

To change the escalation delay later, send `escalation_delay_days` to `PATCH /reconciliations/{id}`, or `null` to turn it off. Records already loaded are moved to the new delay too (see [when a record becomes overdue](https://endclose.com/docs/concepts/exceptions.md#when-a-record-becomes-overdue)).

```bash cURL theme={"dark"}
curl -X PATCH https://api.endclose.com/v1/reconciliations/$RECONCILIATION_ID \
  -H "X-API-Key: $ENDCLOSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "escalation_delay_days": 5 }'
```

## Continuous and batch reconciliations

| `run_type` | When matching happens |
| - | - |
| `continuous` | Each record is checked against the one-to-one rules as it arrives. A few minutes after an import lands, End Close also queues a run so [rollup rules](https://endclose.com/docs/guides/rollup-rules.md) apply to the new records. |
| `batch` | Records wait for the next run. You start one with **Run** in the app or through the API, and End Close starts one when a rule is activated or the reconciliation agent runs one. |

### Change the run type

Change `run_type` on **Configure** in the app, or with `PATCH /reconciliations/{id}`. When a reconciliation changes from `batch` to `continuous`, End Close queues one run over the unmatched records already loaded, so they don't wait for a run that no longer comes. A run already in progress finishes first. A change from `continuous` to `batch` starts no run.

### Run a batch reconciliation

`POST /reconciliations/{id}/run` starts a background run of the matching engine over the reconciliation's unmatched records and active rules. It's the same run as **Run** in the app.

```bash cURL theme={"dark"}
curl -X POST https://api.endclose.com/v1/reconciliations/$RECONCILIATION_ID/run \
  -H "X-API-Key: $ENDCLOSE_API_KEY"
```

The call returns `202` with the queued run. Poll `GET /reconciliations/{id}`: the run shows as `current_run` while it's `pending` or `running`, and as `last_run` once it has `completed` or `failed`. `rule_summary` on the run counts matches per rule as it goes.

A reconciliation has at most one run in progress. If one is already pending or running, the call returns `409` with that run in the body so you can poll it instead. Continuous reconciliations return `422`, because they have no on-demand run.

## Adjustments

Sometimes the two sides of a match don't balance to the cent: a bank fee, an FX rounding difference, a short payment. End Close balances the match with an adjustment record, a "plug" sized to the difference, so the match nets to zero. Adjustments come from:

* a manual match where you ask for one (`create_adjustment: true` on `POST /reconciliation_matches`), with a reason that becomes the adjustment's description;
* a many-to-one rule that matches within a variance (`rollup.tolerance`), which books the difference as "Rule variance";
* approving a suggested fix in an [exception review](https://endclose.com/docs/concepts/exceptions.md);
* a [write-off](https://endclose.com/docs/guides/write-off-a-record.md), where the plug offsets records that have no counterpart.

Adjustments live on the reconciliation's own adjustments streams, one per side, with type `adjustments`. These streams belong to that reconciliation alone. A plug never lands on one of your real feeds, so it can't show up as an unmatched line in another reconciliation that shares the feed. Deleting the reconciliation deletes its adjustments streams too.

## Approvals

A reconciliation can require a second person to approve the matches people make by hand (maker-checker), and an admin to approve the large ones. Set this under **Configure** → **Approvals** in the app, or with `PATCH /reconciliations/{id}`. Only admins can change these settings in the app.

| Setting | What it does |
| - | - |
| **Manual matches need a second approver** (`manual_match_approval`) | Every match or write-off someone makes by hand, from the side-by-side view or an exception review, is held instead of matched. It shows in **Exceptions** as "Human review needed", with who proposed it, the amount and, for a write-off, the reason. Someone else approves or rejects it. The person who proposed it can't approve it, but can withdraw it. |
| **Require an admin to approve matches over** (`approval_limit_cents`) | Approving a held match above this amount takes an admin. This applies to matches held by rules with `requires_approval` too. With the second-approver setting off, a member's manual match above the limit is held for an admin, while smaller ones and an admin's own matches are final. |

A match's amount is the larger of the two sides' absolute totals; for a write-off, the total of the records written off.

While a match waits for approval, its records stay unmatched, and matching rules leave them alone. In an exception review their lines show **Waiting for approval**. Approving does exactly what the match would have done when it was made, including any adjustment. Rejecting leaves the records unmatched.

Matches made through the API (`POST /reconciliation_matches`) are not held: an API key has no person behind it to check.

## The reconciliation agent

Each reconciliation has an agent that writes and refines its matching rules. It runs on its own when records are uploaded or matched by hand. Before it adds a rule, it tests the rule against a sample of your records. Rules it creates show `source: "ai"`.

`GET /reconciliations/{id}/agent_status` returns what it's doing:

| Field | Description |
| - | - |
| `status` | `idle`, `running` or `failed`. |
| `last_run_at` | When the agent last ran. |
| `progress` | The steps of the last run, in order. |
| `reasoning` | The agent's assessment from its last rule analysis. |
| `rules_count` | Active rules on the reconciliation. |
| `unmatched_count` | Unmatched records across both sides. |

## Periods in the app

The reconciliation page in the app shows matched and unmatched totals for each side over a period: **All Time**, **Last 3 Months**, **This Month**, **This Week**, or a custom date range. The period changes what you see, not what gets matched.

## Reconciliation stories

A reconciliation story chains related reconciliations so you can follow money end to end, for example processor to clearing account, then clearing account to bank. The first link is the `origin`. Each later link is a `continuation` and names the shared data stream that connects it to the previous reconciliation. Manage stories with the `/reconciliation_stories` endpoints.

## Related

> [card] [Rules and matches](https://endclose.com/docs/concepts/rules-and-matches.md)
>
> How records on the two sides are paired.

> [card] [Exceptions](https://endclose.com/docs/concepts/exceptions.md)
>
> Where unmatched, overdue lines go.

> [card] [Matching rules](https://endclose.com/docs/guides/matching-rules.md)
>
> Write your first rules.

> [card] [API reference](https://endclose.com/docs/api-reference/overview.md)
>
> Reconciliation, run and story endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.