v1

latestOpenAPI 3.0.3MIT2026-07-22153276289.7 KB
Documents

Get list of all documents

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

get/v3/documents

Query parameters

offsetinteger

The number of documents to skip before starting to collect the result set.

limitinteger
Example:20

The numbers of results to return.

workspacestring

Uniquely identify a workspace.

Example:mEFayXdO

Filter by workspace.

collectionstring

Uniquely identify a collection.

Example:mEFayXdO

Filter by collection.

state'uploaded' | 'review' | 'validated' | 'archived' | 'rejected'

Filter by the document's state.

tagsId[]

Filter by tag's IDs.

[
  1
]
created_dt'today' | 'yesterday' | 'week' | 'month' | 'year'

Filter by created datetime.

searchstring

Partial, case-insensitive match with file name or tag name.

orderingstring[]

Sort the result set. A "-" at the beginning denotes DESC sort, e.g. -created_dt. Sort by multiple fields is supported. Supported values include: 'file_name', 'extractor', 'created_dt', 'validated_dt', 'archived_dt' and 'parsed__<dataPointSlug>'.

include_databoolean

By default, this endpoint returns only the meta data of the documents. Set this to true will return a summary of the data that was parsed. If you want to retrieve the full set of data for a document, use the GET /documents/{identifier} endpoint.

excludeDocumentMetaPropertiesIdentifier[]

Exclude some documents from the result.

in_reviewboolean

Exclude documents that are currently being reviewed.

failedboolean

Filter by failed status.

readyboolean

Filter by ready status.

validatableboolean

Filter for validatable documents.

has_challengesboolean

Filter for documents with challenges.

custom_identifierstring

Filter for documents with this custom identifier.

compactboolean

If "true", the response is compacted to annotations' parsed data. Annotations' meta data are excluded. Default is "false".

countboolean

If "false", the documents count is not computed, thus saving time for large collections. Default is "true".

snake_caseboolean

Whether to return the response in snake_case instead of camelCase. Default is false.

Response

All documents for user

countinteger required

Number of items in results.

nextstring nullable

URL to request next page of results.

previousstring nullable

URL to request previous page of results.

Example response

{
  "count": 10,
  "results": [
    {
      "meta": {
        "customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834",
        "fileName": "Document.pdf",
        "ready": true,
        "readyDt": "2020-12-10T01:43:32.276724Z",
        "language": "en",
        "pdf": "https://affinda-api.s3.amazonaws.com/media/documents/Document.pdf?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
        "parentDocument": {
          "customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834"
        },
        "childDocuments": [
          {
            "customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834"
          }
        ],
        "pages": [
          {
            "image": "https://affinda-api.s3.amazonaws.com/media/pages/Page.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
            "imageTranslated": "https://affinda-api.s3.amazonaws.com/media/pages/PageTranslated.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
            "height": 700,
            "width": 500,
            "rotation": 90
          }
        ],
        "collection": {
          "identifier": "mEFayXdO",
          "extractor": {
            "identifier": "resume"
          },
          "validationRules": [
            {
              "slug": "supplier_name_is_alphanumeric"
            }
          ]
        },
        "workspace": {
          "identifier": "mEFayXdO"
        },
        "confirmedBy": {
          "id": 1,
          "name": "Carl Johnson",
          "username": "carljohnson",
          "email": "carljohnson@grove.street",
          "avatar": "https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
        },
        "rejectedBy": {
          "id": 1,
          "name": "Carl Johnson",
          "username": "carljohnson",
          "email": "carljohnson@grove.street",
          "avatar": "https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
        },
        "archivedBy": {
          "id": 1,
          "name": "Carl Johnson",
          "username": "carljohnson",
          "email": "carljohnson@grove.street",
          "avatar": "https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
        },
        "errorCode": "document_conversion_failed",
        "errorDetail": "Unable to convert word document",
        "tags": [
          {
            "id": 1,
            "workspace": "mEFayXdO"
          }
        ],
        "createdBy": {
          "id": 1,
          "name": "Carl Johnson",
          "username": "carljohnson",
          "email": "carljohnson@grove.street",
          "avatar": "https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
        },
        "regionBias": {
          "strict": true
        }
      },
      "error": {
        "errorCode": "document_conversion_failed",
        "errorDetail": "Unable to convert word document"
      },
      "warnings": [
        {
          "warningCode": "too_many_pages",
          "warningDetail": "File exceeds maximum number of pages allowed, parsing the first 10 pages only."
        }
      ]
    }
  ]
}