Edit a batch cell
Override one extracted field on a batch document.
BatchDocument. Same rules as the attachment cell route. Not billed.Authorizations
Organisation API key from Settings → API / /api/keys/. The secret is
shown once. Send Authorization: Bearer sk-abacus-…. One active key
per organisation. Ingest (/api/v2/ingest/*) refuses API keys — that
surface is Auth0-only with ingest:read / ingest:write scopes.
Body
PATCH body for editing one cell on one batch document.
Fields:
field_id: ID of the schema field whose cell is being edited. Must
be present in the document's pinned StructVersion.schema_json.
value: The user-supplied override. null clears the override and
reverts the cell to the LLM-extracted value. May be a scalar
(text/number/date/enum) or a structured object (currency =
{amount, currency}; table = list[dict]).
source: Bounded UI surface label so the metric on cell edits stays
cardinality-safe. "grid" (default) covers the Hebbia-style
table on /batch/<id>/; "viewer" is the side-by-side
page; "modal_table" is the nested-table editor modal.
side: Which side of a translatable field is being edited. Defaults
to "original" for backward compatibility with the
pre-translation request shape. "translated" is rejected by
the view when the field is untranslatable (number/currency/
date/enum) or the schema has no output_language —
those cells have no translated side to edit.
1 - 200grid- gridviewer- viewermodal_table- modal_table
grid, viewer, modal_table original- originaltranslated- translated
original, translated Response
200 response from PATCH /api/v2/batches/{batch_id}/documents/{doc_id}/cells/.
Fields:
cell: The fully-merged cell payload (as returned by _to_cell()).
Includes both v (effective value, with override applied)
and v_llm (original LLM-extracted value), plus the
is_edited boolean and audit fields. The client uses this
to repaint the single cell in place without a re-fetch. null
when the user cleared an override on a field the LLM never
extracted (no row left to render) — clients guard with
if (!cell) and skip the in-place repaint.
doc_summary: Per-doc edit aggregates after the PATCH. Lets the
client update its "edited X of Y" row badge without doing
its own bookkeeping.
Per-doc edit aggregate returned alongside the freshly-merged cell.
Fields:
edit_count: Number of fields on this doc with a non-null override
after the PATCH lands. Equal to len(extraction_overrides)
but reported here so the client doesn't need a follow-up GET.
field_count: Total number of fields in the doc's pinned schema
version. Used by the client to render an "edited X of Y"
badge on the row.
edit_ratio: edit_count / field_count clamped to [0.0, 1.0].
Always 0.0 when field_count == 0 (plain transcription /
no-schema doc — the endpoint rejects those before reaching
this point, but the field is still typed for safety).

