Reconciliation periods

Update a reconciliation period

Corrects the dates or balances on an editable period. Changing it re-derives the start date and opening balance of every later period on the account. Requires the reconciliations:write permission.

PATCH
https://services.magicdoor.com/accounting/company-portal/reconciliations/periods/{reconciliationPeriodId}

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.

Path parameters

reconciliationPeriodIdstringrequired

Snowflake id of the reconciliation period.

example: 1830472847398411100

Body

application/json

At least one field is required. Which fields you may send is what capabilities.canEdit on the period reports — sending one it says is system-derived is rejected.

periodStartstring · date

New first day, read in the company's timezone. Only editable on the account's first period.

periodEndstring · date

New last day, read in the company's timezone. It must be before today and after periodStart.

openingBalancenumber

New opening balance. Only editable on the account's first period.

closingBalancenumber

New closing balance from the statement.

Response

200 · The period after the change.

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 reconciliation period with this id belongs to the caller's company.

422 · No fields were sent; the period is not editable; you sent a field that is system-derived for this period; `periodEnd` is today or later; or the resulting range would not be positive. Read `capabilities` and `blockers` on the period to see which.

Later periods move with it

Every period after this one on the same bank account has its periodStart and openingBalance recomputed from the chain. A correction to one statement therefore ripples forward through all of them.