---
title: "The filing's document as filed, for the in-app reader (Story 60.4)"
method: GET
path: "/api/v1/filings/{filing_id}/document"
tags: ["Filings"]
---

# The filing's document as filed, for the in-app reader (Story 60.4)

`GET /api/v1/filings/{filing_id}/document`

## Request

- Base URL: `https://api.hub-equity.com`
- URL: `https://api.hub-equity.com/api/v1/filings/{filing_id}/document`
- Auth: HTTP bearer

Fetched from the regulator's archive at the first request (SEC EDGAR, filings.xbrl.org, or the national package already cached for the note view), never stored in the database. Same fetch-on-demand contract as ``/disclosure-html``; this one returns the whole document instead of one note.

## Path parameters

- `filing_id` string, required

## Response `200`

Successful Response

- ApiResponseFilingDocumentPayload
  - `success` boolean, required
  - `data` FilingDocumentPayload: Payload returned by ``GET /filings/{id}/document`` (Story 60.4).
    - `filing_id` string, required
    - `html` string, nullable: The filing's document as filed, as one complete HTML document for an `<iframe sandbox srcdoc>` WITHOUT `allow-scripts`: scripts and event handlers removed, the filer's styles and iXBRL element ids kept, a CSP that refuses every network load, photos above 100 KB dropped. Scroll to a cited number with `getElementById(fact_id)`. Null when the document cannot be reached: open `viewer_url` instead.
    - `document_lang` string, nullable: ISO 639-1 language declared by the document.
    - `viewer_url` string, nullable: The filing's viewer, the fallback when html is null.
  - `error` ApiError: API error details.
    - `code` string, required
    - `message` string, required
    - `details` object, nullable
  - `meta` ApiMeta: API response metadata. Pagination fields (``page`` / ``per_page`` / ``total``) are populated on collection endpoints only. They are omitted from the payload on single-resource endpoints.
    - `timestamp` string, date-time
    - `request_id` string, nullable
    - `page` integer, nullable
    - `per_page` integer, nullable
    - `total` integer, nullable
  - `links` ApiLinks: HATEOAS-style pagination cursors. Host-relative path + query links for a collection page. Present on collection endpoints, ``null`` fields where a page doesn't exist (``next`` on the last page, ``prev`` on the first). The whole ``links`` object is omitted from single-resource responses (see ``ApiResponse`` serializer).
    - `self` string, nullable
    - `first` string, nullable
    - `prev` string, nullable
    - `next` string, nullable
    - `last` string, nullable

## Other responses

- `422`: Validation Error

---

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