GET
/
v3
/
documents
Get list of all documents
curl --request GET \
  --url https://{region}.affinda.com/v3/documents \
  --header 'Authorization: Bearer <token>'
{
  "count": 10,
  "next": "<string>",
  "previous": "<string>",
  "results": [
    {
      "data": {},
      "extractor": "<string>",
      "meta": {
        "identifier": "<string>",
        "customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834",
        "fileName": "Document.pdf",
        "ready": true,
        "readyDt": "2020-12-10T01:43:32.276724Z",
        "failed": false,
        "expiryTime": "2023-11-07T05:31:56Z",
        "language": "en",
        "pdf": "https://affinda-api.s3.amazonaws.com/media/documents/Document.pdf?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
        "parentDocument": {
          "identifier": "<string>",
          "customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834"
        },
        "childDocuments": [
          {
            "identifier": "<string>",
            "customIdentifier": "46ab8b02-0e5b-420c-877c-8b678d46a834"
          }
        ],
        "pages": [
          {
            "id": 2,
            "pageIndex": 0,
            "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
          }
        ],
        "isOcrd": true,
        "ocrConfidence": 123,
        "reviewUrl": "<string>",
        "documentType": "<string>",
        "collection": {
          "identifier": "mEFayXdO",
          "name": "<string>",
          "extractor": {
            "identifier": "resume",
            "name": "<string>",
            "baseExtractor": "<string>",
            "validatable": true
          },
          "validationRules": [
            {
              "slug": "supplier_name_is_alphanumeric",
              "dataPoints": [
                "<string>"
              ]
            }
          ],
          "autoRefreshValidationResults": true
        },
        "workspace": {
          "identifier": "mEFayXdO",
          "name": "<string>"
        },
        "archivedDt": "2023-11-07T05:31:56Z",
        "isArchived": true,
        "skipParse": true,
        "confirmedDt": "2023-11-07T05:31:56Z",
        "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"
        },
        "isConfirmed": true,
        "rejectedDt": "2023-11-07T05:31:56Z",
        "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"
        },
        "isRejected": true,
        "createdDt": "2023-11-07T05:31:56Z",
        "errorCode": "document_conversion_failed",
        "errorDetail": "Unable to convert word document",
        "file": "<string>",
        "html": "<string>",
        "tags": [
          {
            "id": 1,
            "name": "<string>",
            "workspace": "mEFayXdO",
            "documentCount": 1
          }
        ],
        "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"
        },
        "sourceEmail": "<string>",
        "sourceEmailAddress": "<string>",
        "regionBias": {
          "country": "<string>",
          "countries": [
            "<string>"
          ],
          "squareCoordinates": [
            123
          ],
          "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."
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication using an API key, e.g. {Authorization: Bearer aff_0bb4fbdf97b7e4111ff6c0015471094155f91}. You can find your API key within the Settings page of the Affinda web app. You can obtain an API key by signing up for a free trial.

Query Parameters

offset
integer

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

Required range: x >= 0
Example:

0

limit
integer

The numbers of results to return.

Required range: 1 <= x <= 100
Example:

20

workspace
string

Filter by workspace.

Example:

"mEFayXdO"

collection
string

Filter by collection.

Example:

"mEFayXdO"

state
enum<string>

Filter by the document's state.

Available options:
uploaded,
review,
validated,
archived,
rejected
tags
integer[]

Filter by tag's IDs.

Uniquely identify a tag.

created_dt
enum<string>

Filter by created datetime.

Available options:
today,
yesterday,
week,
month,
year

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

ordering
string[]

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_data
boolean

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.

exclude
string[]

Exclude some documents from the result.

Unique identifier for the document

in_review
boolean

Exclude documents that are currently being reviewed.

failed
boolean

Filter by failed status.

ready
boolean

Filter by ready status.

validatable
boolean

Filter for validatable documents.

has_challenges
boolean

Filter for documents with challenges.

custom_identifier
string

Filter for documents with this custom identifier.

compact
boolean

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

count
boolean

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

snake_case
boolean

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

Response

200
application/json

All documents for user

The response is of type object.