Welcome to the new Affinda Docs – explore the Academy, browse guides, or ask the AI assistant any questions you have!
curl --request GET \
--url https://{region}.affinda.com/v3/documents/{identifier} \
--header 'Authorization: Bearer <token>'
{
"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."
}
]
}
Return a specific document.
curl --request GET \
--url https://{region}.affinda.com/v3/documents/{identifier} \
--header 'Authorization: Bearer <token>'
{
"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."
}
]
}
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.
Document's identifier
Specify which format you want the response to be. Default is "json"
json
, xml
, hr-xml
If "true", the response is compacted to annotations' parsed data. Annotations' meta data are excluded. Default is "false".
Whether to return the response in snake_case instead of camelCase. Default is false.
Successfully retrieved document.
The response is of type object
.