Reconciliation periods

Create a reconciliation period

Opens a draft period on a bank account from a statement's end date and closing balance. Requires the reconciliations:write permission.

POST
https://services.magicdoor.com/accounting/company-portal/reconciliations/periods

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Body

application/json

Whether periodStart and openingBalance are allowed depends on history. On the account's very first period both are required. Once any period has been locked both are forbidden — the start is the day after the last locked period ended and the opening balance is that period's closing balance.

bankAccountIdstringrequired

The bank account to open the period on.

example: 1830472847398404096
periodEndstring · daterequired

Last day of the period, read in the company's timezone. It must be before today in the company's timezone.

example: 2026-07-31
closingBalancenumberrequired

The balance the bank statement ends on, as a decimal.

example: 14750
periodStartstring · date

First day of the period. Required on the account's first period, forbidden afterwards.

openingBalancenumber

The balance the statement starts from, as a decimal. Required on the account's first period, forbidden afterwards.

Response

200 · The period that was created, as a `draft`.

idstring

Snowflake id of the period.

bankAccountIdstring

The bank account this period covers.

periodStartstring · date

First day of the period, in the company's timezone.

periodEndstring · date

Last day of the period, in the company's timezone.

openingBalancenumber

The bank's balance at the start of the period, as a decimal.

closingBalancenumber

The bank's balance at the end of the period, as a decimal, taken from the statement.

statusenum<string>

draft while being prepared, locked once closed, reopened after a locked period has been opened up again. Both draft and reopened are editable.

draftreopenedlocked
validityStatusenum<string>

Only meaningful once locked. valid when nothing outstanding affects it; invalidated when it has an unacknowledged disposition of its own; impacted when an earlier period is invalidated, so this one's numbers are indirectly in doubt. A draft or reopened period is always valid.

validinvalidatedimpacted
dispositionsDisposition[]

Things that changed after this period was locked and are waiting to be acknowledged.

lockedstring · date-time

When the period was locked, in the company's timezone. Absent while it is draft or reopened.

createdstring · date-time

When the period was created, in the company's timezone.

updatedstring · date-time

When it last changed, in the company's timezone.

401 · The access token is missing, expired, or not for this company.

403 · The caller does not hold the `reconciliations:write` permission.

404 · No bank account with this id belongs to the caller's company.

422 · `periodEnd` is today or later; the account already has a `draft` or `reopened` period; the range overlaps an existing period; or `periodStart` or `openingBalance` was required and missing, or supplied when it should have been derived. The `detail` says which.

A period is one bank statement's worth of time on one bank account. You create it as a draft with the statement's closing balance, work through the reconciliation items inside it, and lock it once the bank's figures and MagicDoor's agree. Periods sit end to end: each one starts the day after the last locked one ended and opens with that period's closing balance.

statusWhat it meansWhat you can do
draftBeing prepared. Nothing is frozen.Edit it, delete it, or lock it.
lockedClosed. Its items are frozen into a snapshot and can no longer be resolved or rematched.Reopen it — but only if no later period is still locked.
reopenedWas locked, then opened up again. Editable like a draft, and its items are free again.Edit it, delete it, or lock it again.
One editable period at a time

A bank account can have at most one draft or reopened period. Creating a second one is rejected until the existing one is locked or deleted.