Reassign a document schema
Pin a published schema version onto one batch document.
BatchDocument. Does not extract by itself — follow with Reprocess if you want a fresh run.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
Body for batch version reassignment endpoints (Task 16).
Accepts a single version_number field; the consuming view resolves it
against the parent batch's struct and rejects deprecated versions.
x >= 1Response
Response shape for POST /api/v2/batches/{id}/documents/{doc_id}/version/.
Extends the summary with id (so the grid can repoint
row.struct_version_id), pinned_field_ids (the sorted list of
field IDs in the new version's schema_json — needed by the JS grid
so the per-row out-of-schema mask refreshes after reassignment without
a full page reload), the per-row output-language hints
(output_language / output_language_label /
output_language_is_rtl), and source_languages /
source_language_labels from the new version's pinned schema.
The output-language hints are read by batch_grid.js::reassignDocVersion
to refresh row.output_language* after a reassignment — without
them, a doc reassigned from a French-only version to an Arabic version
would still render its cells LTR (the per-row RTL flag would stay
stale until a full page reload), and the inline editor + sub-table
modal would inherit the wrong language label too.
AD-205 clean cut: this serializer no longer reads or emits
translation_language. Stored schema_json blobs were rewritten
by backfill_schema_keys before deploy, so every read site can
safely assume output_language is the only key.
0 <= x <= 2147483647Compact projection of the user who published / deprecated a version.
Compact projection of the user who published / deprecated a version.
500500
