Browse the extensions reference

Accept Suggestions

post/extensions/roboledger/{graph_id}/operations/accept-suggestions

Part of RoboLedger: Ledger & Events.

Take the suggestion on every open bank line the filters select, oldest first: each is classified to its suggested_element_id through the same update a single line goes through, and posted too with commit: true. Select by source, agent_id, suggestion_source (agent_default for the learned ones), a date range, or explicit event_ids from a multi-select. A line it cannot take — no suggestion to take, already classified or posted, a closed month, a choice the handler refuses — comes back skipped with the reason, never forced. dry_run: true reports the counts without writing; limit bounds a call and truncated says more matched.

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

Constraints: matches ^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$

Header parameters

NameTypeDescription
Idempotency-KeyoptionalstringIdempotency-Key

Request body

Required, application/json.

FieldTypeDescription
entity_idoptionalstring

The entity whose inbox to act on. Omit for the group parent.

event_idsoptionalstring[]

Explicit lines, as from the inbox's multi-select; each is answered, even one that cannot be taken. The other filters still narrow them.

sourceoptionalstring

Only lines from this feed (plaid, mercury).

agent_idoptionalstring

Only one counterparty's lines.

suggestion_sourceoptionalstring

Only lines whose suggestion came from here: agent_default (the counterparty's learned default), tier0 (the bank's category) or ai.

occurred_fromoptionalstring (date)

Only lines dated on or after this day.

occurred_tooptionalstring (date)

Only lines dated on or before this day.

commitoptionalboolean

Post each taken line as well (captured → committed). Off, the lines are classified and wait for a person to post them.

Default: false

limitoptionalinteger

At most this many lines per call, oldest first; truncated in the response says whether more matched.

Default: 200

Constraints: 1–1000

dry_runoptionalboolean

Report what each line would do without writing. A closed month is found only when a line actually posts, so a real run can still skip one a dry run counted.

Default: false

Example request

curl
curl -X POST "https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/accept-suggestions" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "entity_id": "string",
  "event_ids": [
    "string"
  ],
  "source": "string",
  "agent_id": "string",
  "suggestion_source": "string",
  "occurred_from": "2026-01-31",
  "occurred_to": "2026-01-31",
  "commit": false,
  "limit": 200,
  "dry_run": false
}'

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

resultoptionalAcceptSuggestionsResponse

Command-specific result payload

AcceptSuggestionsResponse fields
FieldTypeDescription
selectedrequiredinteger

Lines the filters matched, before the limit.

classifiedrequiredinteger

Lines classified to their suggestion and left to post.

committedrequiredinteger

Lines classified to their suggestion and posted.

skippedrequiredinteger

Lines not taken, each with a reason.

truncatedrequiredboolean

More lines matched than the limit allowed in this call.

dry_runrequiredboolean

Nothing was written.

linesrequiredAcceptSuggestionLine[]

Each line looked at, oldest first.

AcceptSuggestionLine fields
FieldTypeDescription
event_idrequiredstring

The line.

outcomerequiredstring

What happened to it.

One of: classified, committed, skipped

reasonoptionalstring

Why a skipped line was not taken: not_open (already classified, posted or retracted), no_suggestion (nothing to take, or a name that matches no account), source_changed (the feed changed it after capture), closed_period, locked (another process holds it; retry), or refused (the handler would not post the choice).

detailoptionalstring

The refusal's own words, when there was one.

element_idoptionalstring

The account the suggestion names.

descriptionoptionalstring

The line's description.

atrequiredstring

ISO-8601 UTC timestamp

createdByoptionalstring

User ID that initiated the operation

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