Get document (chat id)
Get a Deep Reader chat document by chat pk.
{id} is the Deep Reader chat pk. For the attachment-id surface use Get a document.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.
Path Parameters
Response
Full document projection for the document viewer.
Extends DocumentListItemSerializer with content + extraction fields, and the schema-versioning + override surface introduced by the schema-versioning, editable-batch-grid, and per-field-translation tracks.
Optional fields (markdown_content, extraction_result) are included only when
non-empty/non-null to keep the payload lean. The legacy
extraction_schema_json JSONField was dropped from ChatAttachment by
documents/0017_struct_versioning_backfill_and_drops and replaced by the
extraction_struct_version FK; SPA reads extraction_struct (below) to
get the (slug, version_number, schema_url) triple it needs to navigate to
the schema authoring UI.
True iff the doc has any user-edited cells (AD-164 editable batch grid).
Surfaces an "edited" badge in the SPA list view so users can spot which docs have human corrections without opening the detail page.
True iff the doc has any per-page processing warnings from Lynx (AD-147).
Surfaces a warning icon in the SPA list view; SPA can navigate to the viewer to see per-page detail.
Return the (slug, version_number, schema_url) triple for the
StructVersion that produced this extraction.
Replaces the legacy extraction_schema_json field (dropped in
documents/0017). SPA uses this to:
- link to the schema authoring page (
/structs/<slug>/edit/) - fetch the immutable published schema JSON via
/api/v2/structs/<slug>/versions/<n>/(already exposed by the structs sub-namespace, seedeckmonkey/api_v2/structs/urls.py) - show "extracted using v" badges in the document viewer
Returns None when the document was processed without a schema (free
transcription) or when the version reference was orphaned by hard
delete (defensive).
Return per-page Lynx OCR warnings for this document (AD-147).
Each entry shaped like {page, code, message, severity}. Empty list
when the document processed cleanly. SPA renders these inline in the
viewer to flag pages where OCR self-recovery had to fall back.
Number of fields with at least one user-edit override (AD-164).
Counts the dict keys in extraction_overrides regardless of which
side (original / translated) was edited. SPA shows this as a small
badge on the document detail header.
True iff at least one override entry has a translated_value slot
populated (AD-164 per-side editing).
Distinct from has_overrides (any side) — useful for SPA to know
whether translation edits exist before deciding whether to surface the
translated/original toggle on the document viewer.
255
