API Reference

Ledger Lock

4 endpoints· Auth: JWT or API Key
post/api/v1/console/loss/days/lock JWT API Key

Lock one business day, `CLOSED → LOCKED`.,,

Idempotent: a second lock of the same day flips nothing and returns 0 rather than failing. A day whose loss is at or above its threshold comes back as `VALIDATION` naming the threshold — the remedy is a field the caller can supply, not a state they must change.

Capability
manage_periods
API key scope
cap:manage_periods (the key's owner must also hold the capability)

Request body

application/json
{
  "businessDate": "2026-11-27",
  "explanation": "string",
  "shift": "Morning"
}
businessDate
string (date)
—
explanation
string
The manager's explanation, required only when the day's unified loss is at or above the threshold (FR-LCT-035). At least 10 trimmed characters — the gate is there to make somebody write a sentence, and "ok" is not one.
shift
LedgerShift
—

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/loss/days/lock" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "businessDate": "2026-11-27",
  "explanation": "string",
  "shift": "Morning"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/loss/periods/close JWT API Key

Close a reporting period, `open → closed`

The accountant's "I am done posting". It does not freeze the ledger — that is the lock — but the dated-write guard already refuses a day in a non-open period.

Capability
manage_periods
API key scope
cap:manage_periods (the key's owner must also hold the capability)

Request body

application/json
{
  "key": "string"
}
key
string
The period key: `"2026-07"` monthly, `"2026-P07"` for 13×4 (BR-105).

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/loss/periods/close" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "key": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/loss/periods/lock JWT API Key

Lock a reporting period, `closed → locked`, sweeping its `CLOSED` ledger rows.,,

Every still-`CLOSED` day on or before the lock-through date is gated individually, so locking a month cannot bypass the day-level threshold. A refusal names the blocking days.

Capability
manage_periods
API key scope
cap:manage_periods (the key's owner must also hold the capability)

Request body

application/json
{
  "key": "string",
  "lockedThrough": "2026-11-27",
  "explanation": "string"
}
key
string
—
lockedThrough
string (date)
Business days on or before this become write-locked, and their `CLOSED` ledger rows become `LOCKED`. The sweep is bounded by this date <b>only</b> — not by the named period's own start — so locking one month can pull earlier still-open days into the gate (FR-ACC-063).
explanation
string
One explanation may satisfy every blocking day, but each day is gated individually (FR-LCT-036) — so locking a month cannot launder a single day past its own threshold.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/loss/periods/lock" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "key": "string",
  "lockedThrough": "2026-11-27",
  "explanation": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/loss/periods/reopen JWT API Key

Reopen a locked period, `locked → open`.,

The only way back from immutable history, and the reason is mandatory and audited. Gated on `reopen_period`, not`manage_periods`: the separation is what stops one person freezing a day and quietly unfreezing it.

Capability
reopen_period
API key scope
cap:reopen_period (the key's owner must also hold the capability)

Request body

application/json
{
  "key": "string",
  "reason": "string"
}
key
string
—
reason
string
—

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/loss/periods/reopen" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "key": "string",
  "reason": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu