API Reference
Ledger Lock
/api/v1/console/loss/days/lock JWT API KeyLock 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
{
"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
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"
}'Request body (JSON)
Headers
/api/v1/console/loss/periods/close JWT API KeyClose 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
{
"key": "string"
}| key string | The period key: `"2026-07"` monthly, `"2026-P07"` for 13×4 (BR-105). |
Responses
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"
}'Request body (JSON)
Headers
/api/v1/console/loss/periods/lock JWT API KeyLock 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
{
"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
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"
}'Request body (JSON)
Headers
/api/v1/console/loss/periods/reopen JWT API KeyReopen 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
{
"key": "string",
"reason": "string"
}| key string | — |
| reason string | — |
Responses
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"
}'Request body (JSON)
Headers