Browse the API reference

Update Event Block

post/extensions/roboledger/{graph_id}/operations/update-event-block

Part of Extensions: RoboLedger.

Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry.

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.

Authentication

Authenticate in any one of these ways — not all of them:

  • API key in the X-API-Key header.
  • Bearer token in the Authorization header.

Path parameters

NameTypeDescription
graph_idrequiredstringGraph Id

Header parameters

NameTypeDescription
Idempotency-KeyoptionalstringIdempotency-Key

Request body

Required, application/json.

FieldTypeDescription
event_idrequiredstring

Target event ID.

transition_tooptionalstring

Status transition. Valid moves depend on current status: captured → classified | committed | voided | superseded; classified → committed | pending | fulfilled | voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries instead. captured → classified records an account choice without posting (bank-feed lines: patch classified_element_id, or accept_suggestion: true, in the same call); the later commit fires the handler. Note: classified and fulfilled are otherwise set by handlers, not by callers, but the transition is allowed for corrections.

One of: classified, committed, pending, fulfilled, voided, superseded

superseded_by_idoptionalstring

New event id that replaces this one. Required when transition_to='superseded'.

descriptionoptionalstring

Replacement free-text summary. Unset = unchanged; pass an empty string to clear.

effective_atoptionalstring (date-time)

New accounting recognition date. Unset = unchanged. Useful when an event was captured against the wrong period.

metadata_patchoptionalobject

Key-value pairs merged into existing metadata (additive patch, not replace).

event_actionoptionalstring

Set or correct the canonical action verb. Unset = unchanged. Useful when an adapter improvement makes a previously-NULL verb fillable, or when reclassifying after the fact.

One of: produce, raise, consume, lower, use, cite, work, deliverService, pickup, dropoff, accept, transferCustody, transferAllRights, transfer, move, modify, combine, separate, copy

obligated_by_event_idoptionalstring

Set/update the forward-materialization link.

discharges_event_idoptionalstring

Set/update the settlement link.

Example request

curl
curl -X POST "https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/update-event-block" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "event_id": "evt_abc123",
  "transition_to": "committed"
}'

Responses

200 Successful Response

FieldTypeDescription
operationrequiredstring

Kebab-case operation name

operationIdrequiredstring

op_-prefixed ULID for audit and SSE correlation

statusrequiredstring

Operation lifecycle state

One of: completed, pending, failed

resultoptionalEventBlockEnvelope

Command-specific result payload

EventBlockEnvelope fields
FieldTypeDescription
idrequiredstring

Event ID (`evt_*` ULID).

event_typerequiredstring

Open-vocabulary event type (e.g. `invoice_issued`, `bank_transaction`, `control_executed`).

event_categoryrequiredstring

REA category, scoped by `event_class` — economic (`sales`, `purchase`, `financing`, `payroll`, `treasury`, `adjustment`, `recognition`, `other`), support (`control`, `approval`, `reconciliation`, `inquiry`), or operational (`pipeline`, `engagement`, `schedule`, `other`) for occurrences that drive no GL — a lead, a lifecycle change, an outreach, a schedule setup.

statusrequiredstring

Lifecycle state. One of: `captured` (raw, pre-classification), `classified` (handler ran, GL pending), `committed` (GL entries posted), `pending` (committed but awaiting fulfillment of an obligation), `fulfilled` (obligation discharged — retractable while its ledger rows are still drafts), `voided` (canceled — terminal), `superseded` (replaced by a corrected event — terminal). See `UpdateEventBlockRequest.transition_to` for the valid transition graph.

occurred_atrequiredstring (date-time)

When the event happened in the real world (UTC).

effective_atoptionalstring (date-time)

Accounting recognition date, when different from `occurred_at`.

sourcerequiredstring

Capture source: `manual`, `system`, `schedule`, a connected provider name (e.g. `quickbooks`), or a registered external source_name. Used for adapter routing.

external_idoptionalstring

Source-system dedup key. Unique with `source` when set, so adapter retries are idempotent.

external_urloptionalstring

Deep link back to the source-system record.

amountoptionalinteger

Economic value in **cents** of `currency`, signed (inflows positive, outflows negative). `null` for non-economic events.

currencyrequiredstring

ISO 4217 currency code for `amount`.

descriptionoptionalstring

Free-text human-readable summary.

metadatarequiredobject

Free-form payload — handler-specific keys when the event ran through a handler, otherwise whatever the adapter captured.

is_reconciling_itemoptionalboolean

True when this event is a reconciling item: a source re-sync surfaced a changed upstream payload for an event whose GL is already posted (committed/fulfilled are immutable to sync) — the local books legitimately no longer mirror the source, and the difference awaits an explicit disposition (restate the affected months, or book a catch-up entry in the open period). The live payload and GL are untouched; the incoming payload is stashed in `metadata.drift_payload` with `metadata.drift_detected_at`.

Default: false

dimension_idsrequiredstring[]

Dimension-member IDs tagging this event (department, fund, project). Propagate to GL entries produced by the handler.

event_classrequiredstring

REA event class — `economic` (drives GL postings) or `support` (audit-trail / value-chain primitive, no GL impact).

event_actionoptionalstring

Canonical action verb refining `event_category`. Null when the source adapter or capture path didn't supply one.

One of: produce, raise, consume, lower, use, cite, work, deliverService, pickup, dropoff, accept, transferCustody, transferAllRights, transfer, move, modify, combine, separate, copy

agent_idoptionalstring

Counterparty agent ID, when the event involves one.

resource_typeoptionalstring

REA resource kind being exchanged (`goods`, `services`, `money`, `right`, `obligation`, `information`, `labor`).

resource_element_idoptionalstring

Specific element ID being exchanged, when known.

replaced_by_event_idoptionalstring

ID of the event that replaces this one. Set when this event was superseded (`status='superseded'`); points forward in the correction chain.

replaces_event_idoptionalstring

ID of the event this one replaces, when applicable. Points backward in the correction chain. Mirror of `replaced_by_event_id` on the predecessor.

obligated_by_event_idoptionalstring

Forward-materialization link — the event that scheduled or obligated this one (e.g. depreciation entries point at the originating `asset_acquired` event).

discharges_event_idoptionalstring

Settlement link — the obligation this event discharges (e.g. `cash_received` pointing at the originating `sale_invoiced`).

created_atrequiredstring (date-time)

Row creation timestamp (UTC).

created_byrequiredstring

ID of the user who captured the event. For adapter-sourced events, the system actor associated with the adapter.

atrequiredstring

ISO-8601 UTC timestamp

createdByoptionalstring

User ID that initiated the operation (null for legacy callers)

idempotentReplayoptionalboolean

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

Default: false

StatusMeaning
400Invalid request
401Authentication required
403Access denied
404Resource not found
409Idempotency-Key conflict — key reused with different body
422Validation error
429Rate limit exceeded
500Internal server error