Documents

Get specific document

Changed on

Return a specific document.

get/v3/documents/{identifier}

Request

Path parameters

identifierstring required

Unique identifier for the document

Document's identifier

Query parameters

format'json' | 'xml' | 'hr-xml'

Specify which format you want the response to be. Default is "json"

compactboolean

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

snake_caseboolean

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

Response

Successfully retrieved document.

dataobject
extractorstring required

Example response

{
  "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."
    }
  ]
}

Changes

    • breaking

      the response property // became nullable for the status (media type: application/json)

    • breaking

      the response property // became nullable for the status (media type: application/xml)

    • info

      api tag Documents added

    • info

      api tag Document API - Document removed

    • info

      added the optional property / to the response with the status (media type: application/json)

    • info

      added the optional property / to the response with the status (media type: application/xml)

    • info

      added the new optional query request parameter snake_case