---
title: "Fetch a document's metadata by ID."
method: GET
path: "/v1/documents/{document_id}"
tags: ["documents"]
---

# Fetch a document's metadata by ID.

`GET /v1/documents/{document_id}`

## Request

- Base URL: `https://api.andish.ru` (the document declares no server; this is the origin it was published from)
- URL: `https://api.andish.ru/v1/documents/{document_id}`
- Auth: none declared

Returns metadata for a single document.

**include_impact=true:** Adds a ``deletion_impact`` block showing how many chunks, edges, entities, and vectors would be removed if this document were deleted. Requires the existing RLS-scoped session — no extra DB connection.

**Default (include_impact=false):** Backward-compatible with v1 clients; ``deletion_impact`` is omitted from the response.

## Path parameters

- `document_id` string, uuid, required: Document UUID.

## Query parameters

- `include_impact` boolean: When true, includes a ``deletion_impact`` block in the response showing what would be affected by deleting this document.

## Response `200`

Successful Response

- DocumentResponse: Metadata response for a single document. E1.5 additions (backward-compatible — new fields only added, none removed): - progress_percent: 0-100 extraction progress for UI polling. - updated_at: already existed; promoted to explicit field (was included). - error_message: present when status='failed' or 'partial'. Machine reasons set by the money ceilings: ``cost_cap_exceeded`` (24-hour ceiling, the allowance comes back within a day) and ``cost_cap_monthly_exceeded`` (calendar-month ceiling of the free tier, comes back on the 1st, 00:00 UTC; ADR-083). A ``partial`` XL parent carries the heaviest code of its failed parts (monthly over daily); a part failure for any other reason leaves the older "N/M parts failed" text there. ADR-091: when the engine did not finish a document the reason is one of ``model_unavailable`` (the parse model did not answer), ``index_write_failed`` (the model answered, the index could not be written) or ``processing_failed`` (anything else, the outcome could not be confirmed). A large document whose parts ALL failed is ``failed`` (not ``partial``) and carries the heaviest code of its parts: the two money codes first, then these three. Only the code is ever stored, never the text of an engine error. - processed_at: set when status='indexed'. ADR-036 §2.6 addition: - content: decrypted plaintext returned to authenticated tenant owner. Present on GET /v1/documents/{id}; absent on list responses (content excluded from list for bandwidth — clients should fetch individual documents when they need the full text). ADR-056 / BE-3 additions (Документы S — backward-compatible, all Optional/None): - content_summary: First ~100 chars of doc text from lightrag_doc_status (no LLM — raw excerpt). None when doc_status absent. - chunks_count: Number of text chunks extracted. None when unavailable. - entity_count: Graph nodes extracted from this document. None when unavailable. - edge_count: Graph edges extracted from this document. None when unavailable.
  - `document_id` string, required
  - `status` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `meta` object, required
  - `progress_percent` integer, required
  - `error_message` string, nullable
  - `processed_at` string, date-time, nullable
  - `content` string, nullable
  - `deletion_impact` DeletionImpactResponse: Serialisable snapshot of DeletionImpact (E7.2 / E7.3). Field names use the short JSON keys mandated by ADR-011 §Decision: ``chunks``, ``edges``, ``entities_exclusive``, ``entities_shared``, ``vectors`` — no ``_count`` suffix in the wire format.
    - `chunks` integer, required
    - `edges` integer, required
    - `entities_exclusive` integer, required
    - `entities_shared` integer, required
    - `vectors` integer, required
  - `is_parent` boolean
  - `document_date` string, nullable
  - `last_queried_at` string, date-time, nullable
  - `content_summary` string, nullable
  - `chunks_count` integer, nullable
  - `entity_count` integer, nullable
  - `edge_count` integer, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/andish/apis/mnemo-api.md) · [All operations](https://skmtc.dev/andish/apis/mnemo-api/llms.txt) · [OpenAPI document](https://skmtc.dev/andish/apis/mnemo-api/revisions/d5449f23414c?raw)
