> ## 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.

# Records

> Learn what a record is in End Close: its required fields, amounts in cents, currency, metadata, and how match status works per reconciliation.

A record is a single financial transaction or entry in a [data stream](https://endclose.com/docs/concepts/data-streams.md), such as a bank deposit, a Stripe charge or a ledger line. Records are what End Close matches: a [reconciliation](https://endclose.com/docs/concepts/reconciliations.md) pairs records from one side with records from the other.

## How records relate to other concepts

* Every record belongs to one [data stream](https://endclose.com/docs/concepts/data-streams.md), named by `data_stream_key`.
* A record takes part in every [reconciliation](https://endclose.com/docs/concepts/reconciliations.md) that includes its stream, and its match status is tracked separately in each one.
* [Rules](https://endclose.com/docs/concepts/rules-and-matches.md) or a person group records into a match.
* An unmatched record that passes its `overdue_at` becomes a line in an [exception](https://endclose.com/docs/concepts/exceptions.md).

## Record fields

| Field | Required | Description |
| - | - | - |
| `data_stream_key` | Yes | The `key` of the stream the record belongs to. |
| `date` | Yes | The transaction date, in ISO 8601 format (`2026-01-15`). |
| `amount` | Yes | The amount as an integer in the currency's minor unit: `25000` is \$250.00. |
| `direction` | Yes | `credit` or `debit`. |
| `currency` | No | A three-letter ISO 4217 code. Defaults to `USD`. |
| `description` | No | Free text, such as the bank's narrative or an invoice reference. |
| `external_id` | No | Your own identifier for the transaction, for cross-referencing and lookups. |
| `metadata` | No | An object of any extra fields, such as a customer ID or batch ID. |
| `id` | No | A UUID you supply (uuidv7 recommended) to make the create safe to retry. |

```json Record theme={"dark"}
{
  "data_stream_key": "stripe_payments",
  "date": "2026-01-15",
  "amount": 25000,
  "direction": "credit",
  "currency": "USD",
  "description": "Invoice #1042",
  "external_id": "pi_abc123",
  "metadata": {
    "customer_id": "cus_xyz"
  }
}
```

> [!WARNING]
>
> `amount` is in cents. Send `25000` for $250.00. A decimal such as `250.00` is truncated to `250`, which is $2.50.

Responses also include `decimal_places` (2 for USD) so you can format the amount.

A record on a `bank_feed` [data stream](https://endclose.com/docs/concepts/data-streams.md) also carries `bank_account`, the account it sits in: `id`, `name`, `mask` and `display_name` (for example `Partner Bank Incoming (7710)`). It is `null` on any other kind of stream.

### Currency

`currency` is optional. If you leave it out, End Close stores the record as `USD`. Input is case-insensitive and stored uppercase, so `"usd"` and `"USD"` are the same. Responses always include `currency`. An invalid code returns `422`.

### Metadata and custom fields

`metadata` holds anything your matching needs beyond the standard fields: an invoice number, a payout ID, a merchant reference. [Rules](https://endclose.com/docs/concepts/rules-and-matches.md) refer to these fields with dot notation, for example `metadata.invoice_number`. To give a field a name and type, add a [property definition](https://endclose.com/docs/concepts/data-streams.md#property-definitions) on the stream.

## Create records

Send one record with `POST /records`, or up to 1,000 at a time with `POST /records/bulk`, which is processed asynchronously.

```bash cURL theme={"dark"}
curl -X POST https://api.endclose.com/v1/records \
  -H "X-API-Key: $ENDCLOSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data_stream_key": "stripe_payments",
    "date": "2026-01-15",
    "amount": 25000,
    "direction": "credit",
    "external_id": "pi_abc123"
  }'
```

If you send your own `id`, a retry with the same `id` returns the original record with `201` instead of creating a duplicate. See [Idempotency](https://endclose.com/docs/api-reference/idempotency.md).

## Match status

A record's status belongs to its entry in a reconciliation, not to the record itself, because the same record can be matched in one reconciliation and open in another. Each entry has:

| Field | Description |
| - | - |
| `status` | `unreconciled` until the record is part of a match in that reconciliation, then `reconciled`. |
| `overdue_at` | When the record counts as overdue if it's still unmatched. Empty when the reconciliation doesn't escalate. |
| `escalated` | `true` once the record is unmatched and past `overdue_at`. |
| `days_unreconciled` | Days since the record's `date`, while it's unmatched. |

To list records by status, call `GET /records` with a `reconciliation_id` and `status=matched` or `status=unmatched`. To see the records in a match, pass `reconciliation_match_id`.

When a record arrives, a continuous reconciliation runs it against its rules straight away. A batch reconciliation matches it on its next run. See [Reconciliations](https://endclose.com/docs/concepts/reconciliations.md#continuous-and-batch-reconciliations).

You can subscribe to [webhook events](https://endclose.com/docs/webhooks/getting-started.md) such as `record.reconciled` and `record.reconciliation_overdue` to react to status changes.

## Update and delete records

You can update or delete a record created with `POST /records`, and only while it's unmatched in every reconciliation. Both calls return `409` once the record is matched anywhere, or when the record came in through `POST /records/bulk` or a file import.

> [!NOTE]
>
> To clear a record that will never match, don't delete it. Write it off with a reason so the decision stays on file. See [Write off a record](https://endclose.com/docs/guides/write-off-a-record.md).

## Related

> [card] [Data streams](https://endclose.com/docs/concepts/data-streams.md)
>
> The sources records belong to.

> [card] [Rules and matches](https://endclose.com/docs/concepts/rules-and-matches.md)
>
> How records are grouped into matches.

> [card] [Exceptions](https://endclose.com/docs/concepts/exceptions.md)
>
> What happens to records that stay unmatched.

> [card] [API reference](https://endclose.com/docs/api-reference/overview.md)
>
> Record endpoints, bulk creates and file imports.


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