---
title: "Get list of all documents"
method: GET
path: "/v3/documents"
tags: ["Documents"]
---

# Get list of all documents

`GET /v3/documents`

Returns all the document summaries for that user, limited to 300 per page.

## Query parameters

- `offset` integer
- `limit` integer
- `workspace` string — Uniquely identify a workspace.
- `collection` string — Uniquely identify a collection.
- `state` 'uploaded' | 'review' | 'validated' | 'archived' | 'rejected'
- `tags` Id[]
- `created_dt` 'today' | 'yesterday' | 'week' | 'month' | 'year'
- `search` string
- `ordering` string[]
- `include_data` boolean
- `exclude` DocumentMetaPropertiesIdentifier[]
- `in_review` boolean
- `failed` boolean
- `ready` boolean
- `validatable` boolean
- `has_challenges` boolean
- `custom_identifier` string
- `compact` boolean
- `count` boolean
- `snake_case` boolean

## Response `200`

All documents for user

- object
  - `count` integer, required — Number of items in results.
  - `next` string, nullable — URL to request next page of results.
  - `previous` string, nullable — URL to request previous page of results.
  - `results` Document[], required
    - `data` object
    - `extractor` string, required
    - `meta` DocumentMeta, required
      - `identifier` string, required — Unique identifier for the document
      - `customIdentifier` string, nullable — Optional identifier for the document that you can set to track the document in the Affinda system. Is not required to be unique.
      - `fileName` string, nullable — Optional filename of the file
      - `ready` boolean — If true, the document has finished processing. Particularly useful if an endpoint request specified wait=False, when polling use this variable to determine when to stop polling
      - `readyDt` string, date-time, nullable — The datetime when the document was ready
      - `failed` boolean — If true, some exception was raised during processing. Check the 'error' field of the main return object.
      - `expiryTime` string, date-time, nullable — The date/time in ISO-8601 format when the document will be automatically deleted. Defaults to no expiry.
      - `language` string, nullable — The document's language.
      - `pdf` string, nullable — The URL to the document's pdf (if the uploaded document is not already pdf, it's converted to pdf as part of the parsing process).
      - `parentDocument` object, nullable — If this document is part of a splitted document, this attribute points to the original document that this document is splitted from.
        - `identifier` string — Unique identifier for the document
        - `customIdentifier` string, nullable — Optional identifier for the document that you can set to track the document in the Affinda system. Is not required to be unique.
      - `childDocuments` object[] — If this document has been splitted into a number of child documents, this attribute points to those child documents.
        - `identifier` string — Unique identifier for the document
        - `customIdentifier` string, nullable — Optional identifier for the document that you can set to track the document in the Affinda system. Is not required to be unique.
      - `pages` PageMeta[], required — The document's pages.
        - `id` integer, required
        - `pageIndex` integer, required — Page number within the document, starts from 0.
        - `image` string, nullable, required — The URL to the image of the page.
        - `imageTranslated` string, nullable — The URL to the translated image of the page.
        - `height` number, required — Height of the page's image in px.
        - `width` number, required — Width of the page's image in px.
        - `rotation` integer, required — The degree of rotation applied to the page. Greater than 0 indicates clockwise rotation. Less than 0 indicates counter-clockwise rotation.
      - `isOcrd` boolean
      - `ocrConfidence` number, nullable
      - `reviewUrl` string, nullable
      - `documentType` string, nullable — The document type's identifier. Provide if you already know the document type.
      - `collection` object, nullable
        - `identifier` string, required — Uniquely identify a collection.
        - `name` string
        - `extractor` object, nullable
          - `identifier` string — Uniquely identify an extractor.
          - `name` string
          - `baseExtractor` string, nullable — Base extractor's identifier.
          - `validatable` boolean
        - `validationRules` ValidationRule[]
          - `slug` string, required — The slug of the validation rule, in lowercase snake_case
          - `dataPoints` Identifier[], required — The data point identifier that this validation rule applies to, can be an empty list if the rule doens't use any data points as sources
        - `autoRefreshValidationResults` boolean — If True, validation results are refreshed whenever annotations are changed.
      - `workspace` object, required
        - `identifier` string, required — Uniquely identify a workspace.
        - `name` string
      - `archivedDt` string, date-time, nullable
      - `isArchived` boolean
      - `skipParse` boolean
      - `confirmedDt` string, date-time, nullable
      - `confirmedBy` UserNullable, nullable
        - `id` integer — Uniquely identify a user.
        - `name` string
        - `username` string
        - `email` string
        - `avatar` string, nullable — URL of the user's avatar.
      - `isConfirmed` boolean
      - `rejectedDt` string, date-time, nullable
      - `rejectedBy` UserNullable, nullable
        - `id` integer — Uniquely identify a user.
        - `name` string
        - `username` string
        - `email` string
        - `avatar` string, nullable — URL of the user's avatar.
      - `archivedBy` UserNullable, nullable
        - `id` integer — Uniquely identify a user.
        - `name` string
        - `username` string
        - `email` string
        - `avatar` string, nullable — URL of the user's avatar.
      - `isRejected` boolean
      - `createdDt` string, date-time
      - `errorCode` string, nullable
      - `errorDetail` string, nullable
      - `file` string, nullable — URL to view the file.
      - `html` string, nullable — URL to view the file converted to HTML.
      - `llmHint` string, nullable — Optional hint inserted into the LLM prompt when processing this document.
      - `tags` Tag[]
        - `id` integer, required — Uniquely identify a tag.
        - `name` string, required
        - `workspace` string, required — Uniquely identify a workspace.
        - `documentCount` integer, required — Number of documents tagged with this.
      - `createdBy` User
        - `id` integer — Uniquely identify a user.
        - `name` string
        - `username` string
        - `email` string
        - `avatar` string, nullable — URL of the user's avatar.
      - `sourceEmail` string, nullable — If the document is created via email ingestion, this field stores the email file's URL.
      - `sourceEmailAddress` string, nullable — If the document is created via email ingestion, this field stores the email's From address.
      - `regionBias` RegionBias, nullable
        - `country` string, nullable — A single alpha-2 country code (e.g. AU) used by google geocoding service
        - `countries` string[], nullable — A list of alpha-2 country codes used by Pelias
        - `squareCoordinates` number[], nullable — A list of coordinates used by Pelias in the shape of [min_lon, min_lat, max_lon, max_lat]
        - `strict` boolean — If true, the location must be within the region, as opposed to prefering locations within the region. Default to false.
    - `error` DocumentError
      - `errorCode` string, nullable
      - `errorDetail` string, nullable
    - `warnings` DocumentWarning[]
      - `warningCode` string, nullable
      - `warningDetail` string, nullable

## Other responses

- `400` — Bad request. If it is a validation error will contain a list of each invalid field
- `401` — Authorisation error
- `403` — Forbidden error
- `default` — UnexpectedError

---

[API](https://skmtc.net/affinda/apis/affinda-api-2.md) · [All operations](https://skmtc.net/affinda/apis/affinda-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinda/affinda-api-2/versions/6772e50cb58e/schema)
