RoboLedger: Ledger & Events

Record Statement Balance

Record the ending balance of a statement (a bank, card or loan statement) for one balance-sheet account, and reconcile the account to it. Give the balance as the statement shows it, as a positive number in the account's normal direction, with the statement's ending date. The ledger's balance at that date is set beside it, counting the drafts the close will post, and the result is recorded on the account's statement reconciliation for the period the statement ends in. On an account a bank feed keeps, ledger lines that did not come from the feed and are dated on or before the statement are listed as outstanding and adjust the statement balance, since the bank had not cleared them; a statement ending before the period's last day is carried to it by the feed's own lines (roll_forward). Attach the statement as evidence by passing the document_id of its stored file (create-document-upload, then complete-document-upload); recording it again with another document lapses a sign-off. Writes no books. The first statement recorded for an account creates its reconciliation, which does not hold the close: turn required_for_close on with set-reconciliation-policy to make every period's close wait for a statement on that account. Recording the same account and date again replaces the earlier balance; when more than one statement ends in a period, the one with the latest date stands. Recording a balance that differs from one already signed off lapses that sign-off. A difference left after the outstanding lines is activity one side has and the other does not yet, or an error on either. Returns the reconciliation's standing for the period.

Idempotency: supply an Idempotency-Key header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

post/extensions/roboledger/{graph_id}/operations/record-statement-balance

Request

  • Base URL: https://api.robosystems.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/record-statement-balance
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Path parameters

graph_idstring required

Headers

Idempotency-Keystring nullable

Request body

element_idstring required

The balance-sheet account the statement is for (a chart-of-accounts element id).

entity_idstring nullable

The entity whose books the account is in, by id. Omit for the group parent. The account must be in that entity's chart.

as_ofstring date required

The statement's ending date.

balancenumber required

The ending balance as the statement shows it, as a positive number in the account's normal direction: money in a bank account, or the amount owed on a loan or a card. Negative for the opposite, such as an overdrawn bank account.

document_idstring nullable

The statement itself, as a document already added with create-document. Kept on the record as evidence.

notestring nullable

Anything worth keeping with the recorded balance.

Example request

{
  "as_of": "2026-08-31",
  "balance": 18250.75
}

Response

Successful Response

operationstring required

Kebab-case operation name

operationIdstring required

op_-prefixed ULID for audit and SSE correlation

status'completed' | 'pending' | 'failed' required

Operation lifecycle state

atstring required

ISO-8601 UTC timestamp

createdBystring nullable

User ID that initiated the operation

idempotentReplayboolean

True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.

Changes

No recorded changes to this operation across all 1 revision of this API.