curl --request GET \
--url https://{region}.affinda.com/v3/documents \
--header 'Authorization: Bearer <token>'{
"count": 10,
"results": [
{
"extractor": "<string>",
"meta": {
"identifier": "<string>",
"pages": [
{
"id": 2,
"pageIndex": 0,
"image": "https://affinda-api.s3.amazonaws.com/media/pages/Page.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
"height": 700,
"width": 500,
"rotation": 90,
"imageTranslated": "https://affinda-api.s3.amazonaws.com/media/pages/PageTranslated.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062"
}
],
"workspace": {
"identifier": "mEFayXdO",
"name": "<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"
}
],
"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
},
"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": "[email protected]",
"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": "[email protected]",
"avatar": "https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
},
"archivedBy": {
"id": 1,
"name": "Carl Johnson",
"username": "carljohnson",
"email": "[email protected]",
"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>",
"llmHint": "<string>",
"tags": [
{
"id": 1,
"name": "<string>",
"workspace": "mEFayXdO",
"documentCount": 1
}
],
"createdBy": {
"id": 1,
"name": "Carl Johnson",
"username": "carljohnson",
"email": "[email protected]",
"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
}
},
"data": {},
"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."
}
]
}
],
"next": "<string>",
"previous": "<string>"
}Returns all the document summaries for that user, limited to 300 per page.
curl --request GET \
--url https://{region}.affinda.com/v3/documents \
--header 'Authorization: Bearer <token>'{
"count": 10,
"results": [
{
"extractor": "<string>",
"meta": {
"identifier": "<string>",
"pages": [
{
"id": 2,
"pageIndex": 0,
"image": "https://affinda-api.s3.amazonaws.com/media/pages/Page.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062",
"height": 700,
"width": 500,
"rotation": 90,
"imageTranslated": "https://affinda-api.s3.amazonaws.com/media/pages/PageTranslated.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062"
}
],
"workspace": {
"identifier": "mEFayXdO",
"name": "<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"
}
],
"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
},
"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": "[email protected]",
"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": "[email protected]",
"avatar": "https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
},
"archivedBy": {
"id": 1,
"name": "Carl Johnson",
"username": "carljohnson",
"email": "[email protected]",
"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>",
"llmHint": "<string>",
"tags": [
{
"id": 1,
"name": "<string>",
"workspace": "mEFayXdO",
"documentCount": 1
}
],
"createdBy": {
"id": 1,
"name": "Carl Johnson",
"username": "carljohnson",
"email": "[email protected]",
"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
}
},
"data": {},
"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."
}
]
}
],
"next": "<string>",
"previous": "<string>"
}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.
The number of documents to skip before starting to collect the result set.
x >= 00
The numbers of results to return.
1 <= x <= 10020
Filter by workspace. Uniquely identify a workspace.
"mEFayXdO"
Filter by collection. Uniquely identify a collection.
"mEFayXdO"
Filter by the document's state.
uploaded, review, validated, archived, rejected Filter by tag's IDs.
Uniquely identify a tag.
x >= 1Filter by created datetime.
today, yesterday, week, month, year Partial, case-insensitive match with file name or tag name.
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__
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.
Unique identifier for the document
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.
All documents for user
Number of items in results.
x >= 010
Show child attributes
Show child attributes
Unique identifier for the document
The document's pages.
Show child attributes
x >= 1Page number within the document, starts from 0.
x >= 00
The URL to the image of the page.
"https://affinda-api.s3.amazonaws.com/media/pages/Page.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062"
Height of the page's image in px.
700
Width of the page's image in px.
500
The degree of rotation applied to the page. Greater than 0 indicates clockwise rotation. Less than 0 indicates counter-clockwise rotation.
-360 <= x <= 36090
The URL to the translated image of the page.
"https://affinda-api.s3.amazonaws.com/media/pages/PageTranslated.png?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062"
Optional identifier for the document that you can set to track the document in the Affinda system. Is not required to be unique.
"46ab8b02-0e5b-420c-877c-8b678d46a834"
Optional filename of the file
"Document.pdf"
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
true
The datetime when the document was ready
"2020-12-10T01:43:32.276724Z"
If true, some exception was raised during processing. Check the 'error' field of the main return object.
false
The date/time in ISO-8601 format when the document will be automatically deleted. Defaults to no expiry.
The document's language.
"en"
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).
"https://affinda-api.s3.amazonaws.com/media/documents/Document.pdf?AWSAccessKeyId=KEY&Signature=SIG&Expires=1663302062"
If this document is part of a splitted document, this attribute points to the original document that this document is splitted from.
Show child attributes
Unique identifier for the document
Optional identifier for the document that you can set to track the document in the Affinda system. Is not required to be unique.
"46ab8b02-0e5b-420c-877c-8b678d46a834"
If this document has been splitted into a number of child documents, this attribute points to those child documents.
Show child attributes
Unique identifier for the document
Optional identifier for the document that you can set to track the document in the Affinda system. Is not required to be unique.
"46ab8b02-0e5b-420c-877c-8b678d46a834"
The document type's identifier. Provide if you already know the document type.
Show child attributes
Uniquely identify a collection.
"mEFayXdO"
Show child attributes
Show child attributes
The slug of the validation rule, in lowercase snake_case
"supplier_name_is_alphanumeric"
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
A random string that uniquely identify the resource.
If True, validation results are refreshed whenever annotations are changed.
Show child attributes
Uniquely identify a user.
x >= 11
"Carl Johnson"
"carljohnson"
URL of the user's avatar.
"https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
Show child attributes
Uniquely identify a user.
x >= 11
"Carl Johnson"
"carljohnson"
URL of the user's avatar.
"https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
Show child attributes
Uniquely identify a user.
x >= 11
"Carl Johnson"
"carljohnson"
URL of the user's avatar.
"https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
"document_conversion_failed"
"Unable to convert word document"
URL to view the file.
URL to view the file converted to HTML.
Optional hint inserted into the LLM prompt when processing this document.
Show child attributes
Uniquely identify a tag.
x >= 11
Uniquely identify a workspace.
"mEFayXdO"
Number of documents tagged with this.
x >= 0Show child attributes
Uniquely identify a user.
x >= 11
"Carl Johnson"
"carljohnson"
URL of the user's avatar.
"https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG"
If the document is created via email ingestion, this field stores the email file's URL.
If the document is created via email ingestion, this field stores the email's From address.
Show child attributes
A single alpha-2 country code (e.g. AU) used by google geocoding service
A list of alpha-2 country codes used by Pelias
A list of coordinates used by Pelias in the shape of [min_lon, min_lat, max_lon, max_lat]
If true, the location must be within the region, as opposed to prefering locations within the region. Default to false.
true
URL to request next page of results.
URL to request previous page of results.