---
title: "Get a document"
method: GET
path: "/api/v1/documents/{document_id}"
tags: ["Documents"]
---

# Get a document

`GET /api/v1/documents/{document_id}`

## Request

- Base URL: `https://www.ifillpdf.com`
- URL: `https://www.ifillpdf.com/api/v1/documents/{document_id}`
- Auth: HTTP bearer

## Path parameters

- `document_id` string, uuid, required

## Response `200`

Document state, schema, and values.

- Document
  - `document_id` string, uuid, required
  - `name` string, required
  - `status` 'analyzing' | 'completed' | 'failed', required
  - `state` string, required
  - `error` string, nullable
  - `page_count` integer, required
  - `page_images_count` integer
  - `preview_image_url` string, nullable
  - `document_type` string, nullable
  - `entities` DocumentEntity[]
    - `id` string
    - `label` string
    - `description` string
    - `color` string
  - `analysis_started_at` string, date-time, nullable
  - `analysis_completed_at` string, date-time, nullable
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `schema` DocumentSchema
    - `version` integer
    - `documentType` string
    - `pages` object[]
    - `parties` DocumentEntity[]
      - `id` string
      - `label` string
      - `description` string
      - `color` string
    - `fields` DocumentField[]
      - `id` string
      - `name` string
      - `label` string
      - `type` 'text' | 'checkbox' | 'signature' | 'date' | 'number'
      - `page` integer
      - `partyId` string
      - `rect` object
  - `values` DocumentValues

## Other responses

- `401`: Missing or invalid API key.
- `404`: Resource not found.
- `410`: Document was deleted.

---

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