Get list of all documents
Changed onReturns all the document summaries for that user, limited to 300 per page.
Request
- Base URLhttps://api.affinda.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
The number of documents to skip before starting to collect the result set.
The numbers of results to return.
Uniquely identify a workspace.
Filter by workspace.
Uniquely identify a collection.
Filter by collection.
Filter by the document's state.
Filter by tag's IDs.
[ 1 ]
Filter by created datetime.
Partial, case-insensitive match with file name, identifier or tag name. For an indexed collection or workspace, it also matches custom identifier and document text.
Sort the results. Put "-" before a value to sort in descending order, e.g. -created_dt. You can sort by more than one value. Supported values: 'identifier', 'file_name', 'extractor', 'collection', 'created_dt', 'validated_dt' and 'archived_dt'.
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 some documents from the result.
Exclude documents that are currently being reviewed.
Filter by failed status.
Filter by ready status.
Filter for validatable documents.
Filter for documents with challenges.
Filter for documents with this custom identifier.
If "true", the response is compacted to annotations' parsed data. Annotations' meta data are excluded. Default is "false".
If "false", the documents count is not computed, thus saving time for large collections. Default is "true".
Whether to return the response in snake_case instead of camelCase. Default is false.
Response
All documents for user
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."
}
]
}
]
}Changes
- breaking
the response property
/////became nullable for the status - info
api tag
Documentsadded - info
api tag
Document API - Documentremoved - info
added the optional property
////to the response with the status
- breaking
- info
added the new optional
queryrequest parametersnake_case
- info